AWS Certified Developer – Associate — Question 439

A developer is writing an AWS Lambda function. The Lambda function needs to access items that are stored in an Amazon DynamoDB table.
What is the MOST secure way to configure this access for the Lambda function?

Answer options

Correct answer: C

Explanation

The most secure way to grant an AWS Lambda function access to other AWS resources is by using an IAM execution role with an attached policy containing the necessary permissions. DynamoDB does not support resource-based policies, making Option B invalid, and storing long-term IAM user credentials in environment variables as in Option A is a security risk. Option D introduces a caching service (DAX) but does not resolve the underlying authentication and authorization requirements.