Q29 — AWS DVA-C02 Ch.3
Question 29 of 100 | ← Chapter 3
A company is using a Python-based AWS Lambda function to add items to an Amazon DynamoDB table. The developer wants to implement a solution that inserts records into the DynamoDB table and retries on insertion failure. Which solution satisfies these requirements with the minimal code changes?
- A. Configure the Python code to invoke the PutItem operation via AWS CLI using shell commands.
- B. Use the DynamoDB HTTP API to invoke the PutItem operation from Python.
- C. Queue items in AWS Glue, which then writes them to the DynamoDB table.
- D. Use the AWS SDK for Python (boto3) to invoke the PutItem operation. ✓
Correct Answer: D. Use the AWS SDK for Python (boto3) to invoke the PutItem operation.
Explanation
Reference: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GettingStarted.Python.html