Search code examples
amazon-web-servicesamazon-ec2amazon-rds

Migrating an Amazon RDS instance to newer generation instance type?


I have an Amazon RDS instance using Mariadb on a T2 micro instance.

enter image description here

I recently received the below email from Amazon:

In June 2023, Amazon RDS announced the deprecation of M4, R4, and T2 database instance types on Amazon RDS for MySQL, MariaDB, and PostgreSQL.

Starting March 11, 2024, Amazon RDS will begin disabling the creation of Amazon RDS for MySQL, MariaDB, and PostgreSQL database instances running on M4, R4, or T2 instance types. And starting on June 1, 2024, Amazon RDS will make best effort to begin upgrading MySQL, MariaDB, and PostgreSQL database instances running on M4, R4, or T2 instance types to equivalent size M5, R5, or T3 newer generation instance type, if available.

We strongly recommend that you migrate your existing Amazon RDS database instances running M4, R4, and T2 instance types to newer generation instance types before May 31, 2024. You may use the following recommendation:

  • Upgrade M4 instance to M5 instance or higher
  • Upgrade R4 instance to R5 instance or higher
  • Upgrade T2 instance to T3 instance or higher

A list of your impacted resource(s) can be found in the 'Affected resources' tab of your AWS Health Dashboard.

To seamlessly upgrade your database’s instance type or engine version, you may consider using RDS Blue Green Deployments 1 for RDS MySQL and RDS PostgreSQL. If you have any questions or concerns, please reach out to AWS Support 2.

1 https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html

2 https://aws.amazon.com/support

Im not very proficient with Amazon AWS, and I understand that I have to upgrade T2 Micro to T3 Micro..

A google search suggested that changing the instance type from T2 to T3 is as simple as clicking the RDS -> click modify -> and change the instance type from there.

But the email suggest using Blue/Green deployments, which when I read up is a more complicated and lengthy process and its main benefit is minimal downtime.

If I am not bothered by down time then can I just update my instance configuration from the Modify section? what are the risks I am looking at? other than a slightly longer downtime? Is there chance of data loss or some other problem that I may face in future?

I am also running a production and staging environment in EC2 running on T2 Micro. enter image description here

will the connection between EC2 and RDS update automatically after changing instance type?

Thank you


Solution

  • If you're not concerned about minimal downtime and are willing to accept some downtime during the instance type upgrade, modifying the instance directly through the AWS Management Console (RDS -> Modify) can be a straightforward approach.

    Of course, there is always a chance of data loss during the upgrade, because your apps may be trying to update/manage the data in your db, and the db may be down. But even with this, it all depends on how your apps approach resiliency (e.g. creating an offline copy of the data to a cache and replicating at some point, showing user errors about the failure and asking user to try later, etc).