How can I upgrade my Amazon Aurora MySQL DB cluster to a new version?

Last updated: 2020-12-21

I have an Amazon Aurora MySQL DB cluster that is currently running version 1.x. How can I upgrade it to version Aurora MySQL 2.x?

Short description

Amazon Aurora versions 1.x are MySQL 5.6 compatible and Amazon Aurora versions 2.x are MySQL 5.7 compatible. Currently, Amazon Relational Database Service (Amazon RDS) doesn't allow in-place upgrade of Aurora MySQL 1.x clusters to Aurora MySQL 2.x.

Note: Perform the update on a non-production DB cluster first. Then, monitor how the changes in the new version affect your instances and applications.

Upgrade your Amazon Aurora MySQL DB cluster from version 1.x to version 2.x using the following methods:

  • Take a snapshot of your DB cluster and then restore it to Aurora MySQL 2.x
  • Set up manual replication to switch your service
  • Use the AWS Database Migration Service (AWS DMS) to migrate your service

Note: Downtime varies depending on which method you use.

Resolution

Upgrade using Snapshot

Follow these steps to upgrade from Aurora MySQL 1.x to Aurora MySQL 2.x using a snapshot:

  1. Open the AWS RDS console.
  2. From the navigation pane, choose Databases, and then choose your Aurora 1.x DB cluster.
  3. Choose Actions, and then choose Take Snapshot.
  4. From the navigation panel, choose Snapshots.
  5. After the snapshot of the DB cluster is created, choose the snapshot and then choose Actions.
  6. Choose Restore Snapshot.
  7. In the Instance Specification section, for DB Engine Version, choose one of the Aurora (MySQL 5.7) 2.x versions available.
  8. Enter the configuration details, and then choose Restore DB Instance.

After the Aurora 2.x cluster becomes available, you can redirect connections to the new DB instance.

Note: If you use a snapshot to upgrade your Aurora DB cluster from version 1.x to version 2.x, and your database supports a live application, stop the application before taking the snapshot. This means you don't lose recent changes to your data. Downtime occurs from the time the snapshot creation starts until the new database creates and enters a running state.

Upgrade using manual replication

Note: When you set up manual replication to upgrade your application, downtime occurs when switching from Aurora MySQL 1.x to Aurora MySQL 2.x.

  1. Enable binary logs on the source Aurora MySQL 1.x DB cluster.
  2. Increase the retention period of your DB cluster.
  3. Take a snapshot of the Aurora MySQL 1.x DB cluster.
  4. Restore the snapshot to Aurora MySQL version 2.x.
  5. Capture the bin log position from the restored DB cluster.
  6. Start the replication from Aurora MySQL 1.x to Aurora MySQL 2.x. For more information, see Configuring binary log file position replication with an external source instance.

After the replication is in sync, point your application to Aurora MySQL 2.x.

Upgrade using AWS DMS

You can also use AWS DMS to upgrade your application, with minimal downtime. This upgrade is more complex than the previous options. To perform this migration, create an Aurora MySQL DB instance version 2.x. Then, perform data replication from Aurora MySQL version 1.x to 2.x using AWS DMS. Downtime occurs when the application moves to Aurora MySQL 2.x.