AWS Certified Developer – Associate (DVA-C02) — Question 6
A developer has created an AWS Lambda function that is written in Python. The Lambda function reads data from objects in Amazon S3 and writes data to an Amazon DynamoDB table. The function is successfully invoked from an S3 event notification when an object is created. However, the function fails when it attempts to write to the DynamoDB table.
What is the MOST likely cause of this issue?
Answer options
- A. The Lambda function's concurrency limit has been exceeded.
- B. DynamoDB table requires a global secondary index (GSI) to support writes.
- C. The Lambda function does not have IAM permissions to write to DynamoDB.
- D. The DynamoDB table is not running in the same Availability Zone as the Lambda function.
Correct answer: C
Explanation
The most likely reason for the failure is that the Lambda function does not have the necessary IAM permissions to write to DynamoDB, which is option C. The other options are incorrect because exceeding concurrency limits does not directly prevent writes, a GSI is not a requirement for basic write operations, and DynamoDB tables do not need to be in the same Availability Zone as Lambda functions for successful writes.