DynamoDB - with ServerlessWhich 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 configurationBSet up a DynamoDB Stream and attach it as an event source to the Lambda functionCUse Lambda to poll the DynamoDB table every secondDConfigure DynamoDB to run Lambda code inside its consoleCheck Answer
Step-by-Step SolutionSolution:Step 1: Identify how DynamoDB triggers LambdaDynamoDB Streams capture table changes and can be linked to Lambda as event sources.Step 2: Evaluate optionsOnly setting up a DynamoDB Stream and attaching it to Lambda is correct; others are invalid or impossible.Final Answer:Set up a DynamoDB Stream and attach it as an event source to the Lambda function -> Option BQuick Check:DynamoDB Stream triggers Lambda = A [OK]Quick Trick: Use DynamoDB Streams to trigger Lambda functions [OK]Common Mistakes:MISTAKESAssuming Lambda can be called directly by DynamoDB without streamsThinking Lambda polls DynamoDB instead of event-drivenBelieving DynamoDB runs Lambda code internally
Master "with Serverless" in DynamoDB9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More DynamoDB Quizzes Access Patterns and Query Optimization - Hot partition prevention - Quiz 2easy Access Patterns and Query Optimization - Burst capacity - Quiz 15hard Backup and Recovery - Cross-region replication (Global Tables) - Quiz 7medium Cost Optimization and Monitoring - Cost estimation for access patterns - Quiz 6medium DynamoDB with AWS SDK - Error handling and retries - Quiz 4medium DynamoDB with AWS SDK - Error handling and retries - Quiz 10medium Security and Access Control - Fine-grained access control - Quiz 4medium Security and Access Control - Condition keys for row-level security - Quiz 10hard Security and Access Control - Why IAM policies protect data - Quiz 7medium Security and Access Control - IAM policy for DynamoDB - Quiz 1easy