SQS vs SNS?
Options
- They are the same service, sold under two different names
- SQS is a queue consumers pull from; SNS pushes to subscribers (Correct option)
- SNS stores messages for 14 days so that consumers can poll them
- SQS is a service meant for sending email messages to customers
Answer
SQS is a queue consumers pull from (each message processed by one consumer); SNS is pub/sub that pushes each message to all subscribers
Why
SQS (Simple Queue Service): messages wait in a queue; workers pull them and each message is handled by one worker. For distributing jobs.
SNS (Simple Notification Service): publish to a topic and it pushes a copy to every subscriber (queues, Lambdas, emails).
Common pattern 'fan-out': SNS topic → one SQS queue per interested service.
Remember
SQS = queue (one consumer per message). SNS = broadcast.