SQS
Simple Queue Service
ELI5 — The Vibe Check
SQS is a message queue in the cloud. One part of your app puts messages in the queue, another part picks them up and processes them later. It's like a to-do list that two different systems share — so if one is busy or crashes, no messages get lost. No more dropped requests.
Real Talk
Amazon SQS is a fully managed message queuing service for decoupling and scaling microservices. It supports standard queues (at-least-once delivery) and FIFO queues (exactly-once, ordered). Messages are retained up to 14 days and can trigger Lambda functions automatically.
Show Me The Code
// Send a message to SQS
import { SQSClient, SendMessageCommand } from '@aws-sdk/client-sqs';
const client = new SQSClient({ region: 'us-east-1' });
await client.send(new SendMessageCommand({
QueueUrl: 'https://sqs.us-east-1.amazonaws.com/123/my-queue',
MessageBody: JSON.stringify({ orderId: '456', action: 'process' }),
DelaySeconds: 0
}));
When You'll Hear This
"Orders go into SQS and the fulfillment service processes them async." / "SQS decouples the payment service from the notification service."
Related Terms
AWS (Amazon Web Services)
AWS is like a giant magical warehouse where you can rent computers, storage, databases, and basically anything tech-related — by the minute.
DynamoDB
DynamoDB is Amazon's NoSQL database that scales to literally any size without you doing anything.
Lambda
AWS Lambda is where you upload a function and AWS runs it when something happens — an HTTP request, a file upload, a database change.
Message Queue
A Message Queue is a waiting room for tasks. Producers drop tasks in the queue, consumers pick them up and process them one at a time.
Serverless
Serverless doesn't mean there are no servers — it means YOU don't have to think about servers. Someone else manages them, scales them, and patches them.
SNS (Simple Notification Service)
SNS is a pub/sub messaging service. One thing publishes a message (like 'new order placed!