Bird
0
0

When a DynamoDB Stream is configured with StreamViewType=OLD_IMAGE, what data does the Lambda function receive upon an item deletion?

medium📝 query result Q4 of 15
DynamoDB - with Serverless
When a DynamoDB Stream is configured with StreamViewType=OLD_IMAGE, what data does the Lambda function receive upon an item deletion?
AThe new item image after deletion (empty)
BThe entire item as it appeared before deletion
COnly the keys of the deleted item
DNo data is sent to Lambda on deletion
Step-by-Step Solution
Solution:
  1. Step 1: Understand StreamViewType=OLD_IMAGE

    This setting sends the item image before the change.
  2. Step 2: Consider the deletion event

    On deletion, the old image contains the full item before it was deleted.
  3. Final Answer:

    The entire item as it appeared before deletion -> Option B
  4. Quick Check:

    OLD_IMAGE sends pre-change data including deletions [OK]
Quick Trick: OLD_IMAGE streams pre-change item data including deletions [OK]
Common Mistakes:
MISTAKES
  • Assuming new image is sent on deletion
  • Thinking only keys are sent
  • Believing no data is sent on deletion

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More DynamoDB Quizzes