DEA-C01 · Question #115
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…
The correct answer is B. Ensure that both the IAM role that EventBridge uses and the Lambda function's resource-based. The lambda resource based policy must allow the events principle to invoke the lambda function. 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…
Question
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?
Options
- AEnsure that the trust policy of the Lambda function execution role allows EventBridge to assume
- BEnsure that both the IAM role that EventBridge uses and the Lambda function's resource-based
- CEnsure that the subnet where the Lambda function is deployed is configured to be a private
- DEnsure that EventBridge schemas are valid and that the event mapping configuration is correct.
How the community answered
(25 responses)- A4% (1)
- B84% (21)
- C8% (2)
- D4% (1)
Explanation
The lambda resource based policy must allow the events principle to invoke the lambda function. 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. https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-run-lambda-schedule.html#eb- schedule-create-rule https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-run-lambda-schedule.html#eb- schedule-create-rule
Topics
Community Discussion
No community discussion yet for this question.