Bird
0
0

You want your Lambda function to update an aggregate count in DynamoDB every time an item is inserted. Which combination of AWS services and features is best suited for this?

hard📝 Application Q9 of 15
AWS - Serverless Architecture
You want your Lambda function to update an aggregate count in DynamoDB every time an item is inserted. Which combination of AWS services and features is best suited for this?
ALambda polls DynamoDB table every minute to count items.
BUse CloudWatch Events to trigger Lambda to update the count.
CDynamoDB Streams triggers an SNS topic that updates the count.
DDynamoDB Streams triggers Lambda, which updates the count in the same DynamoDB table.
Step-by-Step Solution
Solution:
  1. Step 1: Identify event-driven update method

    DynamoDB Streams can trigger Lambda on inserts, enabling real-time processing.
  2. Step 2: Update count efficiently

    Lambda can update the aggregate count directly in DynamoDB, ensuring consistency.
  3. Final Answer:

    DynamoDB Streams triggers Lambda, which updates the count in the same DynamoDB table. -> Option D
  4. Quick Check:

    Streams + Lambda for real-time update = B [OK]
Quick Trick: Use Streams + Lambda for real-time DynamoDB updates [OK]
Common Mistakes:
  • Polling instead of event-driven
  • Using SNS unnecessarily
  • Using CloudWatch Events for table changes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes