AWS - LambdaWhich of the following is the correct way to configure an SQS queue as an event source for a Lambda function?AEnable CloudWatch Events on the SQS queueBAdd an S3 trigger to the Lambda functionCAttach an IAM role to the SQS queueDCreate an event source mapping between the SQS queue and LambdaCheck Answer
Step-by-Step SolutionSolution:Step 1: Know how Lambda connects to SQSLambda uses event source mappings to poll messages from SQS queues.Step 2: Identify correct configurationCreating an event source mapping links the SQS queue to Lambda for automatic invocation.Final Answer:Create an event source mapping between the SQS queue and Lambda -> Option DQuick Check:SQS triggers Lambda via event source mapping = D [OK]Quick Trick: Event source mapping links SQS to Lambda directly [OK]Common Mistakes:MISTAKESConfusing S3 triggers with SQS triggersAttaching IAM roles to SQS instead of LambdaUsing CloudWatch Events incorrectly for SQS
Master "Lambda" in AWS9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More AWS Quizzes API Gateway - Request and response mapping - Quiz 8hard AWS Lambda - Lambda function concept - Quiz 6medium AWS Lambda - Environment variables in Lambda - Quiz 13medium AWS Lambda - Environment variables in Lambda - Quiz 9hard Auto Scaling - Minimum, maximum, and desired capacity - Quiz 13medium CloudWatch - Log groups and log streams - Quiz 3easy CloudWatch - CloudWatch dashboards - Quiz 15hard Elastic Load Balancing - Network Load Balancer (NLB) - Quiz 2easy Elastic Load Balancing - Why load balancing matters - Quiz 7medium RDS and Relational Databases - RDS backup and snapshots - Quiz 5medium