How can I change the RDS's Availability Zone?

0

For historical reason, I have couple of EC2 Instances in the ap-northeast-1a, and they connect to a MySQL RDS instance in ap-northeast-1c (Multi-AZ enabled).

Because of RDS and the EC2s are in difference AZ, every month it costs me a lot on:

**regional data transfer - in/out/between EC2 AZs or using elastic IPs or ELB **

It takes me a while to narrow down this problem.

Now I want to ask for help, is there a best way to change my RDS instance from ap-northeast-1c to ap-northeast-1a?

preguntada hace un año6282 visualizaciones
4 Respuestas
2

To move an Amazon RDS instance from one availability zone to another, you can use the following steps:

  1. Pick an outage window with minimal impact to users. Take a snapshot of your RDS instance.
  2. Create a new RDS instance in the desired availability zone using the snapshot you just created.
  3. Verify that the new RDS instance was created successfully and is working as expected.
  4. When you are ready to switch to the new RDS instance, change your application's configuration to point to the new RDS instance, and then stop the original RDS instance.
  5. If you want to delete the original RDS instance, you can do so once you are sure you no longer need it.

Note that while the RDS instance is being moved, your application may be unavailable. It is important to plan this operation during a maintenance window to minimize the impact on your users.

profile pictureAWS
respondido hace un año
1

Why dont you change the region of the EC2 instance? Ideally, you can create a snapshot out of the EC2 and then an AMI. Through that you can create the same EC2 in the region where you have your database.

profile picture
respondido hace un año
  • There are six EC2 instances connect to this RDS instance, so I thought maybe simple to change one instead of six.

1

You mentioned, that your RDS is already Multi-AZ. I think you can see in what AZ your standby instance is and run promotion or failover, so the standby instance will be a new standby instance.

Or you can create a read replica in ap-northeast-1a AZ, and once replication lag is zero, you can promote it to a new primary instance. No downtime required. Just not forget to change RDS endpoints in your app.

Let me know if you have any questions.

profile picture
Max
respondido hace un año
0

Check out this official Knowledge Center article: https://repost.aws/knowledge-center/rds-move-availability-zone

profile pictureAWS
EXPERTO
respondido hace 10 días

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas