How to use AWS DMS to perform a major version upgrade on RDS

Sonia ManoubiSonia Manoubi
4 min read

Upgrading the major version of your Amazon RDS (Relational Database Service) instance is a crucial task to keep your database up-to-date with the latest features, security patches, and performance improvements. AWS Database Migration Service (DMS) can be a powerful tool to assist you in performing a major version upgrade on your RDS instance seamlessly. In this article, we will explore how to use AWS DMS for this purpose.

Prerequisites

Before we dive into using AWS DMS for a major version upgrade, ensure you have the following prerequisites in place:

  1. Amazon Web Services Account: You need an AWS account with the necessary permissions to perform these operations.

  2. Amazon RDS Instance: You should have an existing RDS instance that you want to upgrade.

Step-by-Step Guide

1. Create a Custom Parameter Group

Create a parameter group for the target DB with rds.logical_replication at 1 and rds.force_ssl at 0 (to allow the connection during the migration)

2. Create the target DB and associate the Parameter Group

In the RDS console, create a new RDS instance with the desired major version. Associate the custom parameter group you created in the previous step with your target DB.

3. Create a Replication Instance

A replication instance acts as the computing and memory resource for your migration task. You can create a new replication instance or use an existing one.

4. Configure Source and Target Endpoints

In the AWS DMS console, navigate to your DMS instance, and configure the source and target endpoints. The source endpoint should point to your existing RDS instance, and the target endpoint should point to your new RDS instance with the upgraded database engine.

5. Create a Migration Task

Create a new migration task in the AWS DMS console and associate it with the source and target endpoints you configured in the previous steps. Specify the migration type as 'Migrate existing data and replicate ongoing changes.'

6. Choose a Data Migration Method

AWS DMS offers various data migration methods, such as Full Load and CDC (Change Data Capture). For a major version upgrade, it's advisable to use the CDC method to minimize downtime.

7. Start the Migration Task

Once your migration task is configured, start it. AWS DMS will begin copying data and changes from your source RDS instance to the target RDS instance.

8. Monitor and Verify

Monitor the progress of your migration task using the DMS console. AWS DMS provides real-time status updates and logs to ensure the migration is proceeding as expected.

9. Test Your Applications

Before finalizing the upgrade, thoroughly test your applications against the new RDS instance to ensure everything works as expected. This step is crucial to identify any potential issues early.

10. Cutover to the New RDS Instance

When you are confident that the upgrade is successful and your applications are running smoothly on the new RDS instance, you can plan a cutover. This involves redirecting your applications to use the new RDS instance. This is typically a brief, controlled downtime.

11. Complete the Migration

After the cutover, you can stop your DMS migration task. The new RDS instance is now running the upgraded database engine, and you can decommission the old instance if necessary.

Best Practices

Here are some best practices to ensure a successful major version upgrade using AWS DMS:

  • Backup and Snapshot: Always take a snapshot of your existing RDS instance before starting the upgrade process. This allows you to roll back in case of any issues.

  • Test Thoroughly: Extensive testing is crucial to avoid post-upgrade problems. Test all aspects of your application to ensure compatibility with the new database engine version.

  • Plan for Downtime: While AWS DMS minimizes downtime, there may still be some downtime during cutover. Plan for this and communicate it to your users.

  • Monitor Performance: After the upgrade, closely monitor the performance of your new RDS instance to ensure it meets your requirements.

  • Stay Informed: Keep an eye on AWS announcements for any new major versions, features, or security updates relevant to your database engine.

Conclusion

Upgrading the major version of your Amazon RDS instance is essential to maintain the security, performance, and features of your database. AWS DMS can help you streamline the process, minimize downtime, and reduce the risks associated with major version upgrades. By following the steps and best practices outlined in this article, you can ensure a smooth and successful upgrade for your RDS instance.

0
Subscribe to my newsletter

Read articles from Sonia Manoubi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Sonia Manoubi
Sonia Manoubi

I am a french Developer, working for a french startup :) i like video games, computers and drinking Ricoré