Bird
0
0

You want to process messages from multiple SQS queues subscribed to the same SNS topic in a single Lambda function. What is the best approach?

hard📝 Application Q9 of 15
AWS - SNS and SQS
You want to process messages from multiple SQS queues subscribed to the same SNS topic in a single Lambda function. What is the best approach?
ASubscribe the Lambda function directly to the SNS topic and remove SQS queues.
BPublish messages directly to Lambda instead of SNS.
CConfigure each SQS queue as an event source for the Lambda function.
DUse SNS to send messages only to one SQS queue connected to Lambda.
Step-by-Step Solution
Solution:
  1. Step 1: Understand Lambda event sources

    Lambda can poll multiple SQS queues as event sources.
  2. Step 2: Keep SNS and SQS for fan-out

    SNS fan-out sends messages to multiple queues; Lambda processes from queues.
  3. Final Answer:

    Configure each SQS queue as an event source for the Lambda function. -> Option C
  4. Quick Check:

    Lambda polls multiple SQS queues [OK]
Quick Trick: Attach all SQS queues as Lambda event sources [OK]
Common Mistakes:
MISTAKES
  • Removing SQS queues and subscribing Lambda directly
  • Publishing messages directly to Lambda
  • Using only one queue for all messages

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes