A data engineer creates an AWS Lambda function that an Amazon EventBridge event will invoke. When the data engineer tries to invoke the Lambda function by using an EventBridge event, an AccessDeniedException message appears. How should the data engineer resolve the exception?
Select an option, then click Submit answer.
Reference / correct answer:
Ensure that both the IAM role that EventBridge uses and the Lambda function's resource-based policy have the necessary permissions.
Most accepted answer: B. Ensure that both the IAM role that EventBridge uses and the Lambda function's resource-based policy have the necessary permissions.
Community votes: A=1, B=5
Selected Answer: B The lambda resource based policy must allow the events principle to invoke the lambda function. https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-run-lambda-schedule.html#eb-schedule-create-rule and https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-run-lambda-schedule.html#eb-schedule-create-rule Amazon SQS, Amazon SNS, Lambda, CloudWatch Logs, and EventBridge bus targets do not use roles, and permissions to EventBridge must be granted via a resource policy. upvoted 5 times
Selected Answer: B Option B upvoted 2 times
Selected Answer: B Only B - makes sense upvoted 3 times
Selected Answer: B "B" is corect because the only way to resolve the AccessDeniedException message is to make sure both the IAM role for EventBridge and the Lambda function's resource-based policy have the necessary permissions. upvoted 3 times
Selected Answer: A The trust policy is what grants an AWS service permission to use the role on behalf of the user. Without this trust relationship, EventBridge won’t have the necessary permissions to invoke the Lambda function. upvoted 2 times didorins 2 years ago Bro you don't assume the execution role. That's for Lambda to do its thing. EventBridge is just the trigger. upvoted 4 times ...