AWS Certified Solutions Architect – Associate (SAA-C03) — Question 422

A serverless application uses Amazon API Gateway, AWS Lambda, and Amazon DynamoDB. The Lambda function needs permissions to read and write to the DynamoDB table.

Which solution will give the Lambda function access to the DynamoDB table MOST securely?

Answer options

Correct answer: B

Explanation

Using an IAM execution role for the Lambda function is the most secure method because it relies on temporary, automatically rotated credentials rather than long-lived IAM user access keys. Options A and C are less secure because they require managing permanent programmatic credentials. Option D is incorrect because the trust relationship must designate AWS Lambda, not DynamoDB, as the trusted entity that can assume the execution role.