Heroku to AWS migration, step by step, without slowing your deploys.
Heroku still works, and you don't have to leave this quarter. But a Heroku migration is easier on your schedule than on someone else's. Below: what changes between Heroku and AWS, the honest alternatives, and the eight-step plan we use. Follow it yourself, or have us run it as a fixed-scope project.
Facts checked: 22 Oct 2026. Prices checked: 24 Oct 2026, us-east-1
What Heroku's February 2026 change means, and what it doesn't.
On 6 February 2026 Heroku moved to what it called a sustaining engineering model: no new features, and no new enterprise contracts. Existing contracts can renew, card-paying customers carry on, and no shutdown date has been announced.
So nothing breaks tomorrow. What does change is the direction of travel: new runtimes, new regions and new integrations will arrive on other platforms first. For a seed-stage team the honest advice is to plan the move for a quiet quarter, not to rush it during a launch.
A quick way to decide.
| If this is you | Our advice |
|---|---|
| Under $300 a month on Heroku, small team, no compliance asks | Stay for now. Revisit in six months. |
| Heroku bill growing past $1,000 a month | Move. The savings usually pay for the migration within a year. |
| An enterprise customer wants SOC 2 or data residency | Move, and build the SOC 2 controls in as you go. |
| You have AWS Activate credits sitting unused | Move. Credits can fund the new setup; they can't pay Heroku. |
| Launching something big in the next 8 weeks | Wait until after the launch. |
Credits run out, usually sooner than the spreadsheet said. If yours end in the next year, read what happens when AWS credits end before you size anything.
Illustrative bills. On-demand list prices, us-east-1, checked 24 Oct 2026, 730 hours a month. Excludes data transfer, NAT data, load balancer usage and logs.
Sources: Heroku pricing, Fargate pricing, RDS for PostgreSQL pricing, ElastiCache pricing, ELB pricing, VPC pricing, Heroku Private Spaces, AWS Activate credits.
Heroku vs AWS: what actually changes.
| Heroku | AWS (ECS Fargate + RDS) | |
|---|---|---|
| Small, illustrative: 2 web dynos + Postgres | $100 a month | about $133 a month |
| Medium, illustrative: 6 processes, Postgres, Redis | $560 a month | about $339 a month |
| Larger, illustrative: 8 processes, HA Postgres, Redis | $2,600 a month | about $1,333 a month |
| Who does the operations work | Heroku runs the platform. You push code. | Fargate and RDS patch the hosts. Someone on your side, or us, owns the Terraform, upgrades, alerts and on-call. |
| Control and networking | Shared runtime by default. Private networking needs a Private Space, available only to verified Heroku Teams and Enterprise. Its price isn't on the pricing page. | Your own VPC from day one: private subnets, security groups, VPC peering, PrivateLink, any instance size. |
| Compliance (SOC 2 evidence, private networking) | HIPAA and PCI are tied to Shield dynos and Shield Postgres. Evidence is mostly screenshots of Heroku settings. | Database and cache in private subnets. CloudTrail, Config and IAM give an auditor exportable evidence. |
| Credits | AWS Activate credits can't pay a Heroku bill. | Activate: Founders tier starts at $1,000 (up to $5,000), Portfolio tier up to $200,000. |
How we priced it. Small: two Standard-1X dynos ($25 each) and Standard-0 Postgres ($50) on Heroku; two Fargate tasks (0.25 vCPU, 0.5 GB) and RDS db.t4g.medium Single-AZ with 64 GB gp3 on AWS. Medium: six Standard-2X dynos ($50 each), Standard-2 Postgres ($200) and Key-Value Premium 2 ($60); six Fargate tasks (0.5 vCPU, 1 GB), db.m7g.large Single-AZ with 256 GB gp3 and two cache.t4g.micro Valkey nodes. Larger: four Performance-M ($250) and four Standard-2X dynos, Premium-4 Postgres ($1,200) and Key-Value Premium 5 ($200); four 2 vCPU, 4 GB tasks plus four 0.5 vCPU, 1 GB tasks, db.r7g.xlarge Multi-AZ with 768 GB gp3 and two cache.t4g.small Valkey nodes. Every AWS column includes an Application Load Balancer (about $16), one NAT gateway (about $33) and three public IPv4 addresses (about $11).
- One small app, no compliance asksStay on Heroku. AWS costs more at this size.
- Bill past $500 a month and growingAWS. The gap widens with every process you add.
- An enterprise customer wants SOC 2 or private networkingAWS, with the controls built in from the start.
- Activate credits unusedAWS. Credits can fund it; they can't fund Heroku.
- Want off Heroku but no one to run AWSLook at the next section first.
Starting prices checked 24 Oct 2026 on each vendor's own page.
Sources: AWS Fargate pricing, Render pricing, Fly.io pricing, Railway pricing, Railway Enterprise.
Heroku migration options: AWS, Render, Fly.io or Railway.
AWS isn't the only way off Heroku, and for some teams it's the wrong one. Here is how we see the four options people usually weigh. Leaving Supabase or Vercel instead? See Supabase to AWS migration and Vercel to AWS migration.
| Option | Model | Good at | Falls short when you need SOC 2 or enterprise customers | Starts at | We'd recommend it when |
|---|---|---|---|---|---|
| AWS (ECS Fargate + RDS) | Your own cloud account. You pay for raw services and run them. | Full control, private networking, any size, Activate credits, the answer enterprise security reviews expect. | It doesn't fall short on compliance. The cost is people: someone has to build and own it. | Pay as you go. A 0.25 vCPU, 0.5 GB task is about $9 a month. | You need compliance, private networking or scale, or have credits to spend. |
| Render | Managed platform, closest to the Heroku experience: git push, managed Postgres, preview environments. | Fast to move to. Little to learn. Has SOC 2 Type II and ISO 27001 reports. | SAML SSO, audit logs at organization level and HIPAA workspaces sit on the Scale plan at $499 a month, and HIPAA adds a 20% compute premium. You get the network controls Render offers, not your own VPC. | Hobby $0 + compute, Pro $25 a month + compute. Web service from $7, Postgres from $6. | A small team that wants Heroku without Heroku, and no enterprise security reviews yet. |
| Fly.io | Containers as small VMs (Machines) in regions you pick. | Low latency in many regions, cheap small machines, good for apps that need to run close to users. | More operations than Heroku: you think about machines, volumes and regions. Managed Postgres starts at $38 a month. SOC 2 Type II is listed, but its plan and price aren't on the pricing page. | shared-cpu-1x, 256 MB: $2.19 a month. | Global, latency-sensitive apps with a team comfortable running a bit more themselves. |
| Railway | Usage-based platform: pay per second for RAM and CPU. | Very quick setup, good for prototypes and side services. About $10 per GB of RAM and $20 per vCPU a month. | SOC 2 Type II, SSO and audit logs are presented on the Enterprise page, with custom pricing. HIPAA BAAs come with Enterprise agreements. | Hobby $5 a month, Pro $20 a month, each including that much usage. | Early products, internal tools and teams that want the lowest effort today. |
If you're a small team with no compliance asks and you just want a Heroku-like experience on a platform with a future, Render, Fly.io or Railway is often the better choice. It's cheaper to move to and cheaper to run in people's time. We'd tell you that on a call.
AWS is the right move when an enterprise customer sends a security questionnaire, when SOC 2 is on the roadmap, when you need private networking or data residency, when the bill is growing past a few hundred dollars a month, or when you have Activate credits. Then the steps below are the plan, and our fixed-scope migration is the way to have it done for you.
Inventory
Step 1: write down everything Heroku does for you.
Migrations go wrong when they miss something Heroku did quietly. Get the list from the CLI, not from memory, for each app:
heroku psfor the dyno formation: process types, dyno sizes and counts.heroku addonsfor every add-on and its plan. Each one becomes a row in the mapping table in step 3.heroku configfor config vars. Mark which are secrets, which are plain settings, and which were set by an add-on.heroku pg:infofor the Postgres version, plan and data size. The size decides your cutover option in step 5.heroku domainsandheroku drainsfor custom domains and log drains.
Then what the CLI won't show: Scheduler jobs, the release phase command, partner IP allowlists, and webhooks pointing at herokuapp.com URLs.
Target architecture
Step 2: pick a boring target architecture.
- Web dynosECS on Fargate, behind an Application Load Balancer
- Worker dynosECS on Fargate, a service with no load balancer
- Release phaseA one-off ECS task run by CI before each deploy
- Heroku PostgresAmazon RDS for PostgreSQL
- Heroku Key-Value Store (Redis)ElastiCache
- Config varsSSM Parameter Store / Secrets Manager
- Pipelines and promotionGitHub Actions + image tags in ECR
- Review appsPreview environments from GitHub Actions
We default to ECS on Fargate rather than Kubernetes. It's the closest thing AWS has to Heroku: hand it a container and a size, and it keeps the right number running.
Database and cache go in private subnets, one AWS account per environment, every resource in Terraform. Heroku's dashboard was your documentation; the Terraform repo replaces it.
You also need a container image. No Dockerfile? Heroku publishes Cloud Native Buildpacks builders, so pack build --builder heroku/builder:26 my-app builds one from your buildpack setup (Heroku CNB builder images).
Step 3: map every add-on to an AWS service, or to a direct account.
| Heroku add-on | On AWS | Watch out for |
|---|---|---|
| Heroku Postgres | RDS for PostgreSQL | Match or exceed the major version. Step 5 covers the move. |
| Heroku Key-Value Store / Redis | ElastiCache (Valkey or Redis OSS) | Usually cache and queues, so it can start empty. Drain queues first. |
| Heroku Scheduler | EventBridge Scheduler running an ECS task | 14 million invocations a month free. Each job runs as its own task. |
| Papertrail, other log drains | CloudWatch Logs, or keep the tool and ship to it with FireLens | CloudWatch charges by volume ingested. Set retention, or it keeps logs forever. |
| SendGrid, Mailgun | Keep them on a direct account, or Amazon SES | SES is $0.10 per 1,000 emails without a plan. New domains need verification and DKIM, and new accounts start in a sandbox. |
| Bucketeer, other S3 add-ons | An S3 bucket in your account | Copy the objects before cutover; the add-on's bucket isn't yours. |
| Heroku Kafka | Amazon MSK | The hardest add-on to move. Plan offsets carefully. |
| Sentry, New Relic, other monitoring | The same tool, on a direct account | Just a new API key. On Datadog, check how its pricing works before the bill is yours. |
| Heroku Connect | No direct equivalent | Salesforce sync needs its own plan. Flag it early. |
One rule covers the whole list: an add-on bought through Heroku is billed by Heroku and goes away when the app does. For anything you're keeping, open a direct account with the vendor before cutover.
Secrets and config
Sources: ECS secrets docs, Secrets Manager pricing, Systems Manager pricing.
Step 4: move config vars into Parameter Store and Secrets Manager.
On AWS, variables live in a store and the ECS task definition says which ones each container gets. ECS injects them as ordinary environment variables, so your code doesn't change.
- SSM Parameter Store for most things. Standard parameters cost nothing to store or read at standard throughput. Use the encrypted
SecureStringtype for API keys. - Secrets Manager for the database password and anything you want rotated automatically. It costs $0.40 per secret per month plus $0.05 per 10,000 API calls.
Two habits from Heroku that don't carry over. First, changing a value doesn't restart anything: AWS's docs say you must force a new deployment for running tasks to pick it up. Put that in your runbook. Second, nobody should be pasting secrets into a console. Copy values once, by script, and name them by environment and app (/prod/api/STRIPE_KEY) so IAM can give each service only its own.
List prices, us-east-1, checked 24 Oct 2026. Excludes data transfer.
Sources: Heroku pricing, Fargate pricing, VPC pricing.
The monthly costs people forget to include.
| Line item | Heroku | AWS |
|---|---|---|
| One always-on web process, 1 GB | $50 (Standard-2X) | about $18 (Fargate, 0.5 vCPU, 1 GB) |
| Load balancer | included | about $16 + usage (ALB) |
| NAT gateway for private subnets | not applicable | about $33 + $0.045 /GB |
| Public IPv4 addresses | included | about $3.65 each |
| TLS certificates | included (ACM) | free with a load balancer (ACM) |
| Logs | add-on | CloudWatch, priced by volume |
| Your time running it | low | low, if it's built simply |
A single small app often costs more on AWS: the load balancer, NAT gateway and IP addresses add about $60 a month before anything runs. AWS wins as you add processes, commit to Compute Savings Plans (up to 50% off Fargate), or have credits to spend.
Postgres cutover
Sources: Heroku on logical replication, Heroku on DMS, AWS DMS docs, Heroku export docs, PlanetScale on Bucardo.
Step 5: choose how the database moves, and be honest about downtime.
Migrate Heroku database to AWS: Heroku Postgres to RDS.
This step decides your downtime, and Heroku makes it harder than other hosts. Heroku says it doesn't support logical replication from Heroku Postgres to external instances, and doesn't grant the superuser or replication roles that tools like AWS DMS need for ongoing replication.
| Option | How it works | Downtime | Use it when |
|---|---|---|---|
| Dump and restore | Stop writes, heroku pg:backups:capture, download, pg_restore --no-acl --no-owner --jobs into RDS, point the app at RDS. | Writes stop for the whole dump and restore. | Most startups. Simple, and you can rehearse the timing exactly. |
| Trigger-based replication (Bucardo) | Triggers on each table capture changes and copy them to RDS while Heroku keeps serving. At cutover, block writes on Heroku and switch. | A short write pause at the switch. | Databases too big to restore inside an acceptable window. |
| AWS DMS, full load only | DMS copies tables with ordinary read access. Ongoing replication (CDC) needs superuser, which Heroku doesn't give. | Same as dump and restore: writes stop for the copy. | Rarely better than pg_restore for Postgres to Postgres. |
| Native logical replication | Not available from Heroku Postgres today. | n/a | Not an option. Don't plan around it arriving. |
For dump and restore, stopping writes means more than maintenance mode. Heroku's docs say heroku maintenance:on doesn't stop worker dynos, and Scheduler jobs still run. Scale workers to zero and pause the scheduler too, or something will write to the old database after the backup.
Rehearse it. Restore a fresh backup into RDS at least twice and time every stage; size alone won't predict the window, because indexes and parallelism change it. Fix restore errors here, not on the night. A common one is the heroku_ext schema, which you create on RDS first.
Trigger-based replication buys a shorter pause with more moving parts: write overhead on Heroku, primary keys on every table, care with schema changes. We use it only when the rehearsed window is too long.
Step 6: get DNS and certificates ready before the night.
- A week before: issue an ACM certificate for every domain on the app and validate it with DNS. Public ACM certificates used on a load balancer are free and renew themselves.
- Two days before: lower the TTL on the records you'll change to 60 seconds, so the switch takes effect quickly.
- Test without DNS: hit the load balancer with the real hostname (a hosts-file entry or
curl --resolve) and check the certificate, redirects and cookies. - At cutover: repoint the CNAME from the Heroku DNS target to the load balancer. For the apex domain, use a Route 53 alias record, or your DNS provider's ALIAS or flattening equivalent.
Leave the domains attached on Heroku until the rollback window closes. Removing them early is how a rollback turns into a certificate problem.
Rollback plan
Step 7: write the rollback plan before you need it.
A rollback plan is a runbook page with three parts:
- The trigger. Decided in advance: error rate above a set level, or a broken critical path such as sign-in or checkout, for more than a set number of minutes.
- The steps. Point DNS back at Heroku, scale its dynos back up, turn maintenance mode off. With a 60-second TTL that's minutes.
- The data question. This is the hard part. Once real writes land in RDS, going back means copying them to Heroku Postgres. So the plan names a point of no return, usually a few hours after cutover, and keeps Heroku untouched until then.
Keep the Heroku apps, database and add-ons running for a week after cutover.
Step 8: what to check in the first week on AWS.
- Alerts on load balancer 5xx rate, latency, RDS CPU and free storage, and restarting ECS tasks.
- RDS automated backups on, with retention you chose on purpose. Then restore one into a scratch instance and time it.
- Every Scheduler job ran at least once on EventBridge, and its logs are where you expect them.
- A deploy from main, and a rollback to the previous image, both done by someone who didn't build the setup.
- The first days of the AWS bill, line by line. NAT data and log ingestion are the usual surprises.
- Webhooks, partner allowlists and OAuth redirect URLs pointing at the new hosts.
- After the rollback window: Heroku apps scaled down, add-ons removed, and the last Heroku invoice checked.
Or hand it to us: a fixed-scope migration in three to five weeks.
- Inventory and build the AWS side in Terraform.
Steps 1 to 4: accounts, network, ECS, RDS, secrets and CI, alongside Heroku. Nothing is switched yet.
- Run staging on AWS.
Your team deploys to it the same way as before: merge to main, it ships.
- Rehearse the database move.
Timed restores into RDS, repeated until we know the cutover window to the minute. If it's too long, we set up trigger-based replication instead.
- Cut over, with a way back.
DNS moves at a quiet hour. Heroku stays up for a week so rolling back is one change.
Several apps, Kafka or Heroku Connect push it toward five weeks; the quote says which. Everything is Terraform in your repository, in your AWS accounts. If you'd rather not run it afterwards either, our managed DevOps plans pick up from cutover day.
Questions founders ask about leaving Heroku.
How long does a Heroku to AWS migration take?
For one app with Postgres, Redis and a handful of add-ons, three to five weeks of calendar time, most of it running both side by side. The cutover itself is one evening.
Can we migrate with zero downtime?
Not with Heroku Postgres in the usual way, because it doesn't support logical replication out and doesn't grant the roles DMS needs for ongoing sync. Trigger-based replication gets you to a short write pause. For most startups a rehearsed, announced maintenance window at a quiet hour is the better trade.
Will AWS be cheaper than Heroku?
For one small app, usually not: the load balancer, NAT gateway and IP addresses add about $60 a month. In our illustrative medium setup AWS comes to about $339 a month against $560 on Heroku. It gets cheaper still with Savings Plans, and Activate credits can pay for it while Heroku can't use them.
Do we have to change our application code?
Usually very little. Config still arrives as environment variables. What changes is anything that assumed Heroku: the PORT handling, file writes to local disk, and code that reads add-on variable names you're retiring.