An EventBridge event is configured to invoke an AWS Lambda function, but invoking the function produces an AccessDeniedException. How should the data engineer fix this error?
Choose an answer
Tap an option to check your answer.
Correct answer: Ensure that both the IAM role that EventBridge uses and the Lambda function's resource-based policy have the necessary permissions..
Why this is the answer
An AccessDeniedException indicates a permissions issue. For EventBridge to invoke a Lambda function, two sets of permissions are crucial: 1. The IAM role used by EventBridge (often a service-linked role or a custom role) needs permission to invoke Lambda functions. 2. The Lambda function itself requires a resource-based policy that explicitly grants permission to the EventBridge service (e.g., events.amazonaws.com) to invoke it. The other options are incorrect: The trust policy of the Lambda function's execution role defines who can assume that role, not who can invoke the function. The subnet configuration for a Lambda function is related to network access, not invocation permissions. EventBridge schemas and event mapping relate to the structure and transformation of event data, not the underlying authorization to invoke a target.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed