06 February,2024 by Rambler
Question : We have a group of RDS Instances , currently configured as Single-AZ hosted in AWS but want to convert to Multi-AZ. There is no IAC code associated with these RDS Instances , so just looking for an AWS CLI based approach .
Answer: It is possible to modify an existing RDS Single-AZ to Mult-AZ , but work with the application teams on planning for some unavailability. There is some outage involved and performance impact.
If your environment can absorb some downtime than the AWS CLI code sample below is a starting point . If your environment cannot absorb any downtime - then you may need to create a temporary Read Replica of your RDS Instance - repoint the DNS to the Read Replica - while you go through the process of converting to multi-AZ.
Changing from Single AZ to Multi AZ is a modify action but does create a temporary outage
--an example change through CLI in myaccount
aws rds describe-db-instances --db-instance-identifier myRDSInstance --query "DBInstances[*].[DBInstanceIdentifier,MultiAZ,AvailabilityZone,SecondaryAvailabilityZone ]" --output table
---------------------------------------------------------
| DescribeDBInstances |
+-------------------------------+--------+--------------+
| myRDSInstance | False | us-east-1a |None
+-------------------------------+--------+--------------+
--make change - using apply-immediately , alternative is to not apply immediately and allow the change to happen during the maintenace windows
aws rds modify-db-instance --db-instance-identifier myRDSInstance --multi-az --apply-immediately
--post successful modification to multiAZ
aws rds describe-db-instances --db-instance-identifier myRDSInstance --query "DBInstances[*].[DBInstanceIdentifier,MultiAZ,AvailabilityZone,SecondaryAvailabilityZone ]" --output table
----------------------------------------------------------------------
| DescribeDBInstances |
+-------------------------------+-------+-------------+--------------+
| myRDSInstance | True | us-east-1a | us-east-1c |
+-------------------------------+-------+-------------+--------------+
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |