AWS Certified Developer – Associate / Question #674 of 557

Question #674

A developer maintains a critical business application that uses Amazon DynamoDB as the primary data store. The DynamoDB table processes thousands of transactions per second and requires immediate notifications whenever items are modified. The developer needs to send email alerts whenever updates occur, with the LEAST amount of change to the existing application code.

How can the developer implement this feature most efficiently?

A

Configure an Amazon CloudWatch alarm to monitor write operations. Use Amazon SNS to send emails when the alarm triggers.

B

Enable a DynamoDB stream on the table. Use an AWS Lambda function to process the stream records and send notifications via Amazon SNS.

C

Modify the application to publish an event to an Amazon SQS queue after each write. Use a Lambda function to poll the queue and send emails.

D

Update the application to directly invoke Amazon SES to send emails immediately after each DynamoDB write operation.

Explanation

Answer B is correct because DynamoDB streams capture real-time item modifications (inserts, updates, deletes) and trigger an AWS Lambda function automatically. The Lambda function processes the stream data and sends notifications via Amazon SNS, requiring no changes to the existing application code.

Option A is incorrect because CloudWatch alarms monitor aggregate metrics (e.g., write operations) and cannot track individual item changes. Option C requires modifying the application to publish events to SQS, which adds unnecessary code changes. Option D directly integrates SES into the application, which also requires code updates. DynamoDB streams (B) provide a serverless, event-driven solution with zero application code changes, making it the most efficient approach.

Answer

The correct answer is: B