Ensure Multi-AZ deployments are used for enhanced availability in Amazon RDS
Description
Amazon RDS offers Multi-AZ deployments that provide enhanced availability and durability for your databases, using synchronous replication to replicate data to a standby instance in a different Availability Zone (AZ). In the event of an infrastructure failure, Amazon RDS automatically fails over to the standby to minimize downtime and ensure business continuity.
Rationale
Database availability is crucial for maintaining service uptime, particularly for applications that are critical to the business. Implementing Multi-AZ deployments with Amazon RDS ensures that your databases are protected against unplanned outages due to hardware failures, network issues, or other disruptions. This configuration enhances both the availability and durability of your database, making it a highly recommended practice for production environments.
Impact
Multi-AZ deployments may increase costs due to the additional resources required to maintain a standby instance; however, the benefits of increased availability and reduced risk of downtime outweigh these costs for critical applications.
Audit Procedure
Using AWS Console
- Login to the AWS Management Console and open the RDS dashboard at AWS RDS Console.
- In the navigation pane, under
Databases, select the RDS instance you want to examine. - Click the
Instance Nameto see details, then navigate to theConfigurationtab. - Under the
Availabilitysection, check theMulti-AZstatus.- If Multi-AZ deployment is enabled, it will display
Yes. - If it is disabled, the status will display
No.
- If Multi-AZ deployment is enabled, it will display
- Repeat steps 2-4 to verify the Multi-AZ status of other RDS instances in the same region.
- Change the region from the top of the navigation bar and repeat the audit for other regions.
Using AWS CLI
- Run the following command to list all RDS instances in the selected AWS region:
aws rds describe-db-instances --region <region-name> --query 'DBInstances[*].DBInstanceIdentifier'
- Run the following command using the instance identifier returned earlier to check the Multi-AZ status:
aws rds describe-db-instances --region --query 'DBInstances[*].[DBInstanceIdentifier,MultiAZ]' --output table
- If the output is
True, Multi-AZ is enabled. - If the output is
False, Multi-AZ is not enabled.
- Repeat steps 1 and 2 to audit each RDS instance, and change regions to verify in other regions.
Expected Result
The MultiAZ parameter should return True for all production RDS database instances, indicating that Multi-AZ deployment is enabled for high availability.
Remediation
Using AWS Console
- Login to the AWS Management Console and open the RDS dashboard at AWS RDS Console.
- In the left navigation pane, click on
Databases. - Select the database instance that needs Multi-AZ deployment to be enabled.
- Click the
Modifybutton at the top right. - Scroll down to the
Availability & Durabilitysection. - Under
Multi-AZ deployment, selectYesto enable. - Review the changes and click
Continue. - On the
Reviewpage, chooseApply immediatelyto make the change without waiting for the next maintenance window, orApply during the next scheduled maintenance window. - Click
Modify DB Instanceto apply the changes.
Using AWS CLI
- Run the following command to modify the RDS instance and enable Multi-AZ:
aws rds modify-db-instance --region <region-name> --db-instance-identifier <db-name> --multi-az --apply-immediately
- Confirm that the Multi-AZ deployment is enabled by running the following command:
aws rds describe-db-instances --region <region-name> --db-instance-identifier <db-name> --query 'DBInstances[*].MultiAZ'
- The output should return
True, indicating that Multi-AZ is enabled.
- Repeat the procedure for other instances as necessary.
Default Value
By default, Amazon RDS instances are created as Single-AZ deployments. Multi-AZ must be explicitly enabled during instance creation or modification.
References
- https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.MultiAZ.html
- https://aws.amazon.com/rds/features/multi-az/
- https://aws.amazon.com/rds/faqs/
CIS Controls
| Controls Version | Control | IG 1 | IG 2 | IG 3 |
|---|---|---|---|---|
| v8 | 12.2 Establish and Maintain a Secure Network Architecture | x | x | |
| v7 | 2.10 Physically or Logically Segregate High Risk Applications | x |
MITRE ATT&CK Mappings
| Techniques / Sub-techniques | Tactics | Mitigations |
|---|---|---|
| M1030 |
Profile
Level 1 | Manual