AWS SQS
Amazon's plain, reliable queue. You send messages and workers read them.
Pick it when You already run on AWS and want a queue you never have to look after.
Skip it if You want a nice dashboard, scheduling and retries without wiring them up yourself.
- Nothing to run or patch
- Very reliable and scales on its own
- Built-in dead-letter queue for failed jobs
- AWS accounts and permissions are confusing at first
- You write the worker loop yourself
- Quick to set up
- Cheap while small
- Easy to leave
- Room to grow
PriceFree tier, then pay per request
How to connect it
- Create a queue in the AWS console and note its URL.
- Create an access key that is only allowed to use that queue.
- Send a message from your app with the AWS SDK.
- Run a worker that reads messages, does the work, then deletes each message.
AWS_REGIONAWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYSQS_QUEUE_URL
import { SQSClient, SendMessageCommand } from "@aws-sdk/client-sqs";
const sqs = new SQSClient({ region: process.env.AWS_REGION });
export const enqueue = (job: object) =>
sqs.send(new SendMessageCommand({
QueueUrl: process.env.SQS_QUEUE_URL,
MessageBody: JSON.stringify(job),
}));