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

I have an Amazon Aurora MySQL-Compatible DB cluster that is currently running version 2.x. How can I upgrade it to Aurora MySQL-Compatible version 3.x?Short descriptionAmazon Aurora versions 2.x are MySQL 5.7 compatible and Amazon Aurora versions 3.x are MySQL 8.0 compatible. Currently, Amazon Relational Database Service (Amazon RDS) doesn't allow in-place upgrade of Aurora MySQL 2.x clusters to Aurora MySQL 3.x. In-place upgrades apply only to 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 2.x to version 3.x using the following methods:Take a snapshot of your DB cluster and then restore it to Aurora MySQL 3.xSet up manual replication to switch your serviceUse the AWS Database Migration Service (AWS DMS) to migrate your serviceNote: Downtime varies depending on the method that you use.

ResolutionUpgrade using SnapshotFollow these steps to upgrade from Aurora MySQL 2.x to Aurora MySQL 3.x using a snapshot:Open the AWS RDS console.From the navigation pane, choose Databases, and then choose your Aurora 2.x DB cluster.Choose Actions, and then choose Take Snapshot.From the navigation panel, choose Snapshots.After the snapshot of the DB cluster is created, choose the snapshot and then choose Actions.Choose Restore Snapshot.In the Instance Specification section, for DB Engine Version, choose one of the Aurora 3.X (compatible with MySQL 8.0.23) versions available.Enter the configuration details, and then choose Restore DB Instance.After the Aurora 3.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 2.x to version 3.x, and your database supports a live application, stop the application before taking the snapshot. This makes sure that you don't lose recent changes to your data. Downtime occurs from the time the snapshot creation starts until the new database is created and enters a running state.Upgrade using manual replicationNote: When you set up manual replication to upgrade your application, downtime occurs when switching from Aurora MySQL 2.x to Aurora MySQL 3.x.Turn on binary logs  on the source Aurora MySQL 2.x DB cluster.Increase the retention period of your DB cluster.Take a snapshot of the Aurora MySQL 2.x DB cluster.Restore the snapshot to Aurora MySQL version 3.x.Capture the bin log position from the restored DB cluster.Start the replication from Aurora MySQL 2.x to Aurora MySQL 3.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 3.x.Upgrade using AWS DMSYou 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 3.x. Then, perform data replication from Aurora MySQL version 2.x to 3.x using AWS DMS. Downtime occurs when the application moves to Aurora MySQL 3.x.

Related informationCreating a DB cluster snapshotRestoring from a DB cluster snapshotGetting started with AWS Database Migration Service