What is SQS?
SQS is a queue that lets one part of your app hand work to another without both being busy at the same time.
Amazon Simple Queue Service (SQS) is a fully managed message queue. One component (the producer) drops messages in, and another (the consumer) picks them up and processes them when it's ready.
SQS is the ticket rail in a restaurant kitchen. Waiters (producers) clip orders onto the rail as fast as customers order. Cooks (consumers) take tickets one at a time at their own pace. A dinner rush doesn't make waiters wait for cooks, and no order gets lost.
Why queues matter
- Decoupling: producers and consumers don't need to know about each other or be up at the same time.
- Absorbing spikes: 10,000 uploads in a minute? They wait safely in the queue while consumers work through them.
- Retries: if processing fails, the message comes back for another try.
In our project
NoteSnap originally triggered Lambda directly from each S3 upload. Putting an SQS queue in between lets us control the pace (so we don't overwhelm Bedrock rate limits), retry failures, and keep failed notes for inspection.
- 1Producer
S3 upload event, API, app
- 2SQS queue
Holds messages safely
- 3Consumer
Lambda or worker, at its own pace
Key takeaways
- A queue decouples producers from consumers.
- Queues absorb traffic spikes and enable retries.
- SQS is fully managed, with no servers or capacity to plan.
Check your understanding
Pick an answer to see the explanation.
1. What's the main benefit of putting a queue between two services?