AWS Certified Developer – Associate — Question 37
A developer tested an application locally and then deployed it to AWS Lambda. While testing the application remotely, the Lambda function fails with an access denied message.
How can this issue be addressed?
Answer options
- A. Update the Lambda function's execution role to include the missing permissions.
- B. Update the Lambda function's resource policy to include the missing permissions.
- C. Include an IAM policy document at the root of the deployment package and redeploy the Lambda function.
- D. Redeploy the Lambda function using an account with access to the AdministratorAccess policy.
Correct answer: A
Explanation
The correct answer is A because the execution role of the Lambda function determines what permissions it has when accessing AWS resources. If the function is failing due to access denied errors, it is likely missing permissions in its execution role. The other options do not directly address the execution role and may not resolve the access issue.