AWS - LambdaYou want a Lambda function to process messages from multiple SQS queues. What is the best way to configure triggers?AUse SNS to fan out messages to Lambda from all queuesBCombine all queues into one and trigger Lambda onceCCreate separate event source mappings for each SQS queue to the same LambdaDConfigure one event source mapping with multiple queue ARNsCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand event source mapping for SQSEach SQS queue requires its own event source mapping to trigger Lambda.Step 2: Evaluate other optionsCombining queues is not straightforward; SNS fans out messages from topics, not queues; one mapping cannot have multiple ARNs.Final Answer:Create separate event source mappings for each SQS queue to the same Lambda -> Option CQuick Check:One event source mapping per SQS queue [OK]Quick Trick: Use one event source mapping per SQS queue for Lambda triggers [OK]Common Mistakes:Trying to use one mapping for multiple queuesConfusing SNS topics with SQS queuesAttempting to merge queues instead of mapping
Master "Lambda" in AWS9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More AWS Quizzes AWS Lambda - Lambda concurrency and throttling - Quiz 9hard AWS Lambda - Lambda handler function structure - Quiz 2easy Auto Scaling - Cooldown periods - Quiz 7medium Auto Scaling - Launch templates - Quiz 4medium CloudWatch - CloudWatch alarms - Quiz 7medium DynamoDB - Why DynamoDB for NoSQL - Quiz 10hard Elastic Load Balancing - ALB vs NLB decision - Quiz 9hard RDS and Relational Databases - RDS pricing considerations - Quiz 4medium RDS and Relational Databases - Multi-AZ deployment for high availability - Quiz 5medium RDS and Relational Databases - RDS backup and snapshots - Quiz 1easy