Bird
0
0

If a Lambda function processes DynamoDB Stream events and filters only updates where the attribute "status" changed to "completed", what will happen when an item is updated from {"status": "pending"} to {"status": "completed"}?

medium📝 Predict Output Q5 of 15
DynamoDB - with Serverless
If a Lambda function processes DynamoDB Stream events and filters only updates where the attribute "status" changed to "completed", what will happen when an item is updated from {"status": "pending"} to {"status": "completed"}?
AThe Lambda function throws an error due to missing data
BThe Lambda function processes the event and triggers downstream actions
CThe Lambda function ignores the event because status changed
DThe Lambda function processes the event but does not trigger actions
Step-by-Step Solution
Solution:
  1. Step 1: Understand event filtering logic

    The Lambda function filters events where status changes to "completed".
  2. Step 2: Check the update condition

    The status changed from "pending" to "completed", so the condition is met.
  3. Final Answer:

    The Lambda function processes the event and triggers downstream actions -> Option B
  4. Quick Check:

    Status change to completed triggers processing = C [OK]
Quick Trick: Lambda triggers only on matching status changes [OK]
Common Mistakes:
MISTAKES
  • Assuming Lambda ignores status changes
  • Expecting errors on valid updates
  • Thinking Lambda processes but skips actions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More DynamoDB Quizzes