Bird
0
0

Which of the following is the correct way to configure a Lambda function to trigger on DynamoDB table changes?

easy📝 Syntax Q12 of 15
DynamoDB - with Serverless
Which of the following is the correct way to configure a Lambda function to trigger on DynamoDB table changes?
ADirectly call Lambda from DynamoDB without any configuration
BSet up a DynamoDB Stream and attach it as an event source to the Lambda function
CUse Lambda to poll the DynamoDB table every second
DConfigure DynamoDB to run Lambda code inside its console
Step-by-Step Solution
Solution:
  1. Step 1: Identify how DynamoDB triggers Lambda

    DynamoDB Streams capture table changes and can be linked to Lambda as event sources.
  2. Step 2: Evaluate options

    Only setting up a DynamoDB Stream and attaching it to Lambda is correct; others are invalid or impossible.
  3. Final Answer:

    Set up a DynamoDB Stream and attach it as an event source to the Lambda function -> Option B
  4. Quick Check:

    DynamoDB Stream triggers Lambda = A [OK]
Quick Trick: Use DynamoDB Streams to trigger Lambda functions [OK]
Common Mistakes:
MISTAKES
  • Assuming Lambda can be called directly by DynamoDB without streams
  • Thinking Lambda polls DynamoDB instead of event-driven
  • Believing DynamoDB runs Lambda code internally

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More DynamoDB Quizzes