What you get after migration
- Same developer experience: Push to deploy, just like Heroku
- Lower costs: AWS infrastructure is typically 40-60% cheaper than Heroku at scale
- Full AWS access: Use any AWS service (RDS, ElastiCache, S3, SQS, etc.)
- Production-ready: Auto-scaling, auto-healing, monitoring, and CI/CD out of the box
- Built-in observability: Open-source stack with Prometheus, Loki, and Grafana—no extra add-ons needed
- No vendor lock-in: Your code runs on standard Kubernetes in your own AWS account
Migration overview
Need help? Schedule a free migration call and our engineers will assist you through
the entire process.
Step 1: Set up LocalOps environment
Before migrating, you need a LocalOps environment running on AWS.Create LocalOps account
Sign up for LocalOps if you haven’t already.
Connect AWS account
Follow the AWS connection guide to connect your AWS account.
Create environment
Create a new environment (e.g., production) in your preferred AWS region. See
Create new environment.
Create service
Create a new service and connect your GitHub repository. See Create new service.
Step 2: Migrate Heroku Postgres to Amazon RDS
2.1 Create a backup of your Heroku Postgres database
First, create a manual backup of your Heroku Postgres database:latest.dump to your current directory.
2.2 Create RDS database in your LocalOps environment VPC
You can either use the declarativeops.json approach (recommended) or create the database manually.
Option A: Using ops.json (Recommended)
Add anops.json file to the root of your repository:
Option B: Manual RDS creation
If you prefer to create the database manually:- Login to AWS Console in the same region as your LocalOps environment
-
Create a DB Subnet Group:
- Navigate to RDS > Subnet groups > Create DB subnet group
- Select the VPC ID from your LocalOps environment
- Add the private subnet IDs from your LocalOps environment
- Save the subnet group
-
Create RDS Instance:
- Navigate to RDS > Create database
- Choose PostgreSQL and select the same major version as your Heroku database
- Select the DB subnet group you created
- Configure instance size (start with
db.t4g.smallfor small apps) - Set
Publicly accessibleto No - Create or select a security group that allows inbound traffic on port 5432 from
10.0.0.0/16(your VPC CIDR)
- Record connection details: Note down the endpoint, username, and password
2.3 Restore backup to Amazon RDS
To restore your Heroku backup to RDS, you need a machine that can access both the backup file and the RDS instance.Option 1: Use an EC2 instance in the same VPC
Option 2: Use AWS Database Migration Service (DMS)
For larger databases or if you need continuous replication during migration, use AWS DMS.2.4 Configure database credentials in LocalOps
If you manually created the RDS instance, add the database credentials as secrets in your LocalOps service:- Navigate to your service in the LocalOps console
- Go to Settings > Secrets
- Add the following secrets:
Step 3: Update your application
Update your application code to use the new environment variables:Step 4: Deploy and verify
- Push your changes to trigger a deployment
- Check logs in the LocalOps console to verify the application starts correctly
- Test your application endpoints
- Update your DNS to point to the new LocalOps environment
Built-in observability
Every LocalOps environment comes with a fully integrated open-source observability stack—no paid add-ons like Papertrail or New Relic required.Prometheus + Grafana for metrics
Prometheus automatically collects CPU, memory, disk, and network metrics from every node running your application. View and analyze metrics through pre-built Grafana dashboards, accessible from the Monitoring tab in your environment. You can filter and group metrics by:- Node
- Pod
- Deployment
- Service
- Namespace
Loki + Grafana for logs
Loki automatically collects all logs from STDOUT and STDERR across your services. No log drain configuration needed—just print to console and your logs are captured. Access logs through the same Grafana dashboard, with powerful filtering by Kubernetes namespace, deployment, or custom labels.Custom dashboards
Each environment gets its own Grafana instance with pre-built dashboards for infrastructure monitoring. You can create custom dashboards to visualize application-specific metrics and logs.Migrating other Heroku add-ons
| Heroku Add-on | AWS Equivalent |
|---|---|
| Heroku Redis | Amazon ElastiCache |
| Heroku Postgres | Amazon RDS |
| CloudAMQP | Amazon SQS |
| Papertrail / Logentries | Built-in logging |
| New Relic / Scout | Built-in metrics |
| Scheduler | Cron jobs |