Bird
0
0

You want to trigger a Lambda function whenever an item is updated in your DynamoDB table to process both the old and new item images. Which DynamoDB Streams configuration and setup is required?

hard📝 Application Q15 of 15
AWS - DynamoDB
You want to trigger a Lambda function whenever an item is updated in your DynamoDB table to process both the old and new item images. Which DynamoDB Streams configuration and setup is required?
AEnable Streams with StreamViewType NEW_AND_OLD_IMAGES and configure Lambda trigger on the stream
BEnable Streams with StreamViewType KEYS_ONLY and configure Lambda trigger on the table
CEnable Streams with StreamViewType NEW_IMAGE and configure Lambda trigger on the stream
DEnable Streams with StreamViewType OLD_IMAGE and configure Lambda trigger on the table
Step-by-Step Solution
Solution:
  1. Step 1: Choose StreamViewType for updates

    To capture both before and after update data, use NEW_AND_OLD_IMAGES.
  2. Step 2: Configure Lambda trigger on the DynamoDB Stream

    Lambda triggers must be set on the stream, not directly on the table.
  3. Final Answer:

    Enable Streams with StreamViewType NEW_AND_OLD_IMAGES and configure Lambda trigger on the stream -> Option A
  4. Quick Check:

    Lambda trigger on stream with NEW_AND_OLD_IMAGES [OK]
Quick Trick: Use NEW_AND_OLD_IMAGES and trigger Lambda on stream [OK]
Common Mistakes:
  • Triggering Lambda directly on table instead of stream
  • Choosing KEYS_ONLY or OLD_IMAGE for update data
  • Not enabling Streams before Lambda trigger

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes