Migrate your Strapi app from Heroku to AWS
Click the Deploy with Microtica button below and follow the template steps to migrate your existing Strapi application from Heroku to your AWS account.
This is a step-by-step tutorial on how to migrate your existing Strapi project from Heroku to AWS, using Microtica’s ready-made Strapi infrastructure template. This guide applies to developers that have a running application on Heroku with PostgreSQL or MySQL database and covers:
- Setup of Strapi infrastructure on AWS
- Migrating PostgreSQL/MySQL database from Heroku to AWS
If you don’t have an existing Strapi project on Heroku, here is a guide on how to deploy a new Strapi Application on your AWS account.
To setup the serverless infrastructure for your existing Strapi application please follow the Deploy an Existing Strapi App guide.
When configuring the template make sure that you select postgres or mysql as DatabaseClient.
Once the infrastructure is deployed and ready (which should be in about 10 minutes), you can proceed with migrating your existing data from Heroku to AWS.
To export the data from your Heroku Postgres database, create a new backup and download it, using the following commands:
To export the data from your Heroku MySQL database, dump the Heroku database on your local development environment using mysqldump tool.
If you get this error message "Unknown table 'COLUMN_STATISTICS' in information_schema", add the command --column-statistics=0. The command adds ANALYZE TABLE statements to the output to generate histogram statistics for dumped tables when the dump file is reloaded.
If you get this error message "Access denied; you need (at least one of) the PROCESS privilege(s) for this operation", add the command --no-tablespaces. The suppresses all CREATE LOGFILE GROUP and CREATE TABLESPACE statements in the output of mysqldump.
Once the connection is established, you can proceed with moving the local copy of the data to AWS.
Load the dump into your Amazon RDS PostgreSQL using the pg_restore tool.