# Background jobs and retries

> Work that runs after the request, with retries. Nicolas Dao's picks for this job (Cloudless Labs, Sydney), in order of preference, what he would avoid, and what to use instead.

- Use case 6 of 21 in The Stack, last reviewed 21 October 2026
- Web page: https://cloudlesslabs.com/stack/use-cases/background/

Picks, in order of preference:

1. **[Amazon SQS](https://cloudlesslabs.com/stack/aws-sqs/index.md)** (My default): The queue. Set visibility timeout to six times the function timeout.
2. **[AWS Lambda](https://cloudlesslabs.com/stack/aws-lambda/index.md)** (My default): Batched consumers with partial batch failures.
3. **[Amazon EventBridge](https://cloudlesslabs.com/stack/aws-eventbridge/index.md)** (My default): Routing and schedules.
4. **[Lambda durable functions](https://cloudlesslabs.com/stack/aws-lambda-durable-functions/index.md)** (Watching (Proposed: research-backed, not yet confirmed by Nic)): Watching, for multi-step jobs with flaky dependencies.

Don't:

- ~~AWS Step Functions~~: A JSON state machine for logic that a few lines of JavaScript express better, and one more thing to deploy and debug. SQS with retries covers simple async work; Lambda durable functions are the candidate for multi-step jobs. Instead: [Amazon SQS](https://cloudlesslabs.com/stack/aws-sqs/index.md) or [Lambda durable functions](https://cloudlesslabs.com/stack/aws-lambda-durable-functions/index.md).

## The picks in brief

- [Amazon SQS](https://cloudlesslabs.com/stack/aws-sqs/index.md): My default. The queue in front of Lambda. Natural back-pressure, nearly free when batched. Pricing: Sydney: $0.40 per million requests (Standard), $0.50 (FIFO). A request carries up to 10 messages, so batching cuts the bill tenfold: 50M messages ≈ $6 batched, $60 unbatched.
- [AWS Lambda](https://cloudlesslabs.com/stack/aws-lambda/index.md): My default. My default for event-driven work and heavy compute. Classic Lambda, zip-packaged, Node.js. Pricing: $0.20 per million requests + $0.0000133334/GB-s on Arm ($0.0000166667 on x86). Free tier: 1M requests and 400,000 GB-s a month, always.
- [Amazon EventBridge](https://cloudlesslabs.com/stack/aws-eventbridge/index.md): My default. The event bus and scheduler I use all the time. Pricing: Classic bus: AWS management events are ingested free; custom events $1 per million (billed in 64 KB chunks). Scheduler: 14 million invocations a month free, then $1.20 per million in Sydney. Pipes: $0.40 per million requests. The new Custom Event Bus (September 2026) bills by data instead: in Sydney $0.19 per GB ingested (first 5 TB) and $0.058 per GB delivered to each subscriber.
- [Lambda durable functions](https://cloudlesslabs.com/stack/aws-lambda-durable-functions/index.md): Watching (Proposed: research-backed, not yet confirmed by Nic). Per-step retries in plain code, inside Lambda. A candidate fix for hand-tuned SQS retry pain. Pricing: Example: 1M runs a month of receive → enrich via a flaky API → write Postgres → notify ≈ $47, vs ~$10 for SQS + one Lambda (where a failure reruns every step) and ~$110 for Step Functions Standard. Sydney rates: $8.70 per million durable operations (each start, completed step, wait and step retry), $0.28 per GB written, $0.17 per GB-month retained, plus normal Lambda requests and compute, replays included.

## Related

- [Compute](https://cloudlesslabs.com/stack/layers/compute/index.md): every tool in this layer
- [APIs, queues and events](https://cloudlesslabs.com/stack/layers/api-events/index.md): every tool in this layer
- [Every use case and tool in one file](https://cloudlesslabs.com/stack/brief.md)
- [Map of every Markdown file on cloudlesslabs.com, with what each one answers](https://ask.cloudlesslabs.com)
