AWS Certified Developer – Associate — Question 436

A company is adding items to an Amazon DynamoDB table from an AWS Lambda function that is written in Python. A developer needs to implement a solution that inserts records in the DynamoDB table and performs automatic retry when the insert fails.
Which solution meets these requirements with MINIMUM code changes?

Answer options

Correct answer: D

Explanation

Using the AWS SDK for Python (boto3) is the optimal choice because it includes built-in, automatic retry logic for standard AWS service errors, achieving the requirement with minimal developer effort. Making direct HTTP API calls would require custom, complex retry logic, while invoking the AWS CLI via Python shell commands is inefficient and adds unnecessary overhead. AWS Glue is an ETL service and is not intended to act as a real-time queuing system for Lambda writes to DynamoDB.