Follow dba-ninja.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

dba-ninja.com Links

Dba_db2_button

Sqlserver_dba_button

Convert Single-AZ AWS RDS to Multi-AZ

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  |

+-------------------------------+-------+-------------+--------------+

 

AWS CLI Cheatsheet - RDS, AWS Backup , DMS, IAM, Security Token Service,KMS,EC2, DynamoDB,VPC,Aurora, Aurora Global,RESOURCEGROUPSTAGGINGAPI,DocumentDB


Author: Rambler (http://www.dba-ninja.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

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.

Working...

Post a comment on Convert Single-AZ AWS RDS to Multi-AZ


dba-ninja.com