Bird
0
0

What is the likely error?

medium📝 Debug Q6 of 15
DynamoDB - with Serverless
A developer wrote this Lambda trigger code for DynamoDB Streams but it never executes. What is the likely error? function handler(event) { console.log('Event received'); } Options: A) Missing export statement for handler B) Incorrect DynamoDB table name C) Stream not enabled on the table D) Lambda function timeout too high
AIncorrect DynamoDB table name
BMissing export statement for handler
CStream not enabled on the table
DLambda function timeout too high
Step-by-Step Solution
Solution:
  1. Step 1: Check Lambda function export

    Lambda requires the handler function to be exported to be invoked.
  2. Step 2: Identify missing export

    Code lacks export statement, so Lambda cannot find the handler to execute.
  3. Final Answer:

    Missing export statement for handler -> Option B
  4. Quick Check:

    Export handler needed = Missing export statement for handler [OK]
Quick Trick: Always export Lambda handler function [OK]
Common Mistakes:
MISTAKES
  • Assuming wrong table name stops Lambda trigger
  • Forgetting to enable stream on table
  • Thinking timeout affects trigger execution

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More DynamoDB Quizzes