AWS Certified Developer – Associate (DVA-C02) — Question 29
A developer wants to insert a record into an Amazon DynamoDB table as soon as a new file is added to an Amazon S3 bucket.
Which set of steps would be necessary to achieve this?
Answer options
- A. Create an event with Amazon EventBridge that will monitor the S3 bucket and then insert the records into DynamoDB.
- B. Configure an S3 event to invoke an AWS Lambda function that inserts records into DynamoDB.
- C. Create an AWS Lambda function that will poll the S3 bucket and then insert the records into DynamoDB.
- D. Create a cron job that will run at a scheduled time and insert the records into DynamoDB.
Correct answer: B
Explanation
The correct answer is B because configuring an S3 event to invoke a Lambda function allows for real-time processing as soon as a file is added to the bucket. Option A involves EventBridge, which is unnecessary for this use case. Option C suggests polling, which introduces delay, and Option D relies on a schedule rather than immediate action.