Databases

Heroku Postgres and Heroku Redis were managed services with fixed plans. Their Tapitalee equivalents are RDS (PostgreSQL or MySQL) and ElastiCache (Redis), created in your AWS account and connected to the app the same way: a DATABASE_URL / REDIS_URL secret variable.

Concept mapping

Heroku Tapitalee Notes
heroku addons:create heroku-postgresql:standard-0 tapit create rds engine=postgres name=maindb size=db.t4g.small storage=64 Choose any RDS instance class and storage size.
Plan tiers (Essential, Standard, Premium) size=, storage=, multi_az= Premium’s HA is multi_az=true.
DATABASE_URL DATABASE_URL Same format, postgres://user:pass@host:5432/db. Stored as a secret variable.
HEROKU_POSTGRESQL_<COLOR>_URL variable= when creating Any name you like, e.g. variable=REPORTING_DATABASE_URL.
Follower (--follow) follower_of=maindb A read replica; engine inherited from the parent.
Credentials (heroku pg:credentials) tapit show addon:credentials name=maindb Plus readonly_user=true to provision a read-only login.
heroku pg:backups:capture tapit create snapshot addon=maindb RDS snapshot.
heroku pg:backups:schedule Automatic daily snapshots (3 days) or the Backup add-on tapit create backup name=nightly period=daily retention_periods=30.
Continuous protection / rollback RDS automated backups and point-in-time restore Managed in the AWS console.
heroku pg:psql tapit run bash image=utility then dbconsole $DATABASE_URL The utility image has psql, mysql, redis-cli and the AWS CLI.
heroku pg:info, pg:diagnose tapit show addon name=maindb, tapit show metrics addon=maindb Plus RDS Performance Insights in AWS.
heroku pg:upgrade version= at create time; major upgrades via AWS console or a new add-on  
heroku addons:attach (shared DB) tapit create addon:share name=maindb share_to_app=otherapp Same team and region. Supports read_only=true.
heroku addons:destroy tapit delete addon name=maindb Final snapshot taken first. Use delete_protection=true to guard production.
Heroku Redis REDIS_URL REDIS_URL redis://:password@host:6379, TLS in transit enabled.
Heroku Redis maxmemory policy cache_eviction=yes|no no for job queues, yes for caches.
Heroku Redis plans size=cache.t4g.micro etc., or serverless=yes  

Creating the database

tapit create rds engine=postgres name=maindb version=16 size=db.t4g.small storage=50
tapit list addons --wait
tapit show addon name=maindb

The app is redeployed with DATABASE_URL once the instance is active. If your Heroku app used the DATABASE_URL convention (Rails, Django with dj-database-url, Phoenix, Node pg), no code change is needed.

Heroku Postgres always used the postgres:// scheme. Tapitalee does too; some newer libraries prefer postgresql://, so check your driver accepts both if you are switching libraries at the same time.

Picking a size

Heroku plans bundled RAM, connection limits and storage. On RDS these are independent:

Heroku Postgres plan RDS starting point
Essential-0 / Mini / Hobby size=db.t4g.micro storage=20 (defaults)
Essential-1 / Basic size=db.t4g.small storage=20
Standard-0 (4 GB RAM) size=db.t4g.medium storage=64
Standard-2 (8 GB RAM) size=db.m7g.large storage=256
Premium-N Same as Standard-N with multi_az=true

Storage and instance size can be increased later with tapit set rds name=maindb size=... storage=... with a short interruption. Storage cannot be reduced.

Connection limits follow the RDS instance class (max_connections is roughly memory-based) rather than a hard plan cap. If you used PgBouncer on Heroku via the buildpack, you can keep it in your Dockerfile, or use RDS Proxy manually in AWS.

Multiple databases

Heroku let you attach several Postgres add-ons with coloured HEROKU_POSTGRESQL_*_URL names. Create one RDS add-on per database and give each its own variable:

tapit create rds engine=postgres name=analytics variable=ANALYTICS_DATABASE_URL

Followers and read-only access

# heroku addons:create heroku-postgresql:standard-0 --follow DATABASE
tapit create rds name=maindb-replica follower_of=maindb variable=REPLICA_DATABASE_URL

# A read-only user on the primary (for BI tools, dashboards)
tapit set rds name=maindb readonly_user=true
tapit show addon:credentials name=maindb

Access from outside the app

Heroku databases were reachable from anywhere with the credentials. RDS add-ons are restricted by allowed_ip_ranges (default: the app only). To connect from your laptop:

  • Temporarily add your IP: tapit set rds name=maindb allowed_ip_ranges=app,203.0.113.10/32, then remove it afterwards, or
  • Use the SSH Server or Tailscale add-ons for a permanent private route.

Redis

# heroku addons:create heroku-redis:premium-0
tapit create elasticache engine=redis name=cache cache_eviction=yes

# Separate instance for Sidekiq / Celery / BullMQ where eviction would lose jobs
tapit create elasticache engine=redis name=queue cache_eviction=no variable=SIDEKIQ_REDIS_URL

Heroku Redis provided both REDIS_URL and REDIS_TLS_URL. ElastiCache enables TLS in transit and gives a single REDIS_URL. If your client needs an explicit TLS flag (e.g. rediss:// or ssl: true), check the ElastiCache page and the show addon output for the exact URL form.