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

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

I am a french Developer, working for a french startup :) i like video games, computers and drinking Ricoré
No comments yet. Be the first to comment.
AWS Bedrock AgentCore lets you deploy agents as managed containerized runtimes. This guide shows how to automate this deployment using Pulumi and Docker. What You'll Deploy Docker container with your agent code Amazon ECR to store the image Bedroc...

Introduction This guide shows how to deploy AWS Bedrock Agents using Pulumi and TypeScript. Prerequisites AWS Account with Bedrock access Node.js and npm installed Pulumi CLI installed Project Setup Generate Project with Pulumi pulumi new aws-t...

Starting My Homelab Journey with a Raspberry Pi 4B

I recently discovered Docker compose profiles and wanted to share it as it can be useful to someone else. Docker Compose profiles let you control which services run without modifying your docker-compose.yml. They’re useful for separating optional s...

These days, i’m using AWS Bedrock to create Agents.And i faced this error when testing my agents many times so i decided to write down the workaround that i found. An error occurred (dependencyFailedException) when calling the InvokeAgent operation: ...

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.
Before we dive into using AWS DMS for a major version upgrade, ensure you have the following prerequisites in place:
Amazon Web Services Account: You need an AWS account with the necessary permissions to perform these operations.
Amazon RDS Instance: You should have an existing RDS instance that you want to upgrade.
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)
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.
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.

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.

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.'

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.
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.
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.
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.
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.
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.
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.
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.