Prompt
cheap serverless background jobs
Latest observation
If you want cheap serverless background jobs, the best options usually depend on how often they run and how long they take:
Good low-cost options
-
AWS Lambda + EventBridge
Great for scheduled jobs, event-driven tasks, and short background work.
Cheap at low volume, but can get pricey with lots of invocations or long runtimes. -
Google Cloud Functions / Cloud Run Jobs
Good for lightweight async work. Cloud Run Jobs is nice if you need containers and longer execution. -
Azure Functions
Similar to Lambda; good for cron-like tasks and event triggers. -
Vercel / Netlify scheduled functions
Very easy for simple jobs, but less ideal for heavier background processing. -
Cloudflare Workers + Queues / Cron Triggers
Often one of the cheapest for high-volume small tasks, especially if jobs are short. -
Upstash QStash + serverless function
Cheap and simple for delayed jobs, retries, and queue-based workflows.
Cheapest pattern in practice
For many apps, the cheapest setup is:
- Queue or scheduler triggers work
- A serverless function processes one small task
- Store state in a cheap DB/object storage
Important cost tips
- Keep jobs short and stateless
- Prefer event-driven over polling
- Batch work when possible
- Use retries and dead-letter queues to avoid wasted invocations
- Avoid always-on workers if “cheap” is the priority
If you want the absolute cheapest
- For tiny jobs: Cloudflare Workers + Cron Triggers
- For delayed/retryable jobs: Upstash QStash
- For AWS-centric stacks: Lambda + SQS/EventBridge
If you tell me:
- how many jobs per day,
- how long each job runs,
- and which cloud you prefer,
I can recommend the cheapest concrete setup.