A job that runs for hours
A nightly import, report or migration longer than 15 minutes.
My stack for this
- 01Fargate scheduled tasks
Runs only while the job runs, billed per second. Spot if it can restart.
- 02Amazon EventBridge
Scheduler starts the task, with time zones.
Don't
- Lambda container images
Not a workaround for long jobs: a container image still stops at Lambda's 15 minutes, with worse cold starts. If it needs a container and hours, run it on Fargate.
Instead: Fargate scheduled tasks
The picks, in brief
What each one is, my verdict, and what it costs. Every name opens the full entry: when to use it and when not, the gotchas with their fixes, provisioning and alternatives.
Containers that run only while the job runs. The answer for a two-hour nightly job.
Pricing: Per second of vCPU and memory while the task runs (one-minute minimum). Nothing between runs. Fargate Spot is cheaper if the job can be interrupted. Sydney, ARM: $0.03885 per vCPU-hour and $0.00426 per GB-hour; x86: $0.04856 and $0.00532. A two-hour nightly run on 2 vCPU and 4 GB (ARM) is about $5.70 a month, against about $69 for the same task left running all month. 20 GB of disk is included.
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.
Where they sit
The layers of the stack this job touches, with every tool named on this page.
Compute
Where business logic runs.
APIs, queues and events
How requests and events move.
Want this stack in your AWS account?
Cloudless Labs is a Sydney consultancy. We migrate on-premises systems to AWS, build serverless apps on this stack, and coach teams to ship with Claude Code and Codex.