Enable Multi-AZ Aurora cluster

💡Note

Configuration Steps 

Step 1. Verify Current Aurora Cluster Configuration 

Ensure that your current Aurora PostgreSQL cluster is correctly set up:

aws rds describe-db-clusters --db-cluster-identifier <your-cluster-identifier>

Step 2. Create a Second Instance in a Different Availability Zone 

  • Identify the current Availability Zone (AZ) of your existing instance.

  • Choose a different AZ for the new instance to enable Multi-AZ deployment.

aws rds create-db-instance \
  --db-instance-identifier <new-instance-identifier> \
  --db-cluster-identifier <your-cluster-identifier> \
  --engine aurora-postgresql \
  --db-instance-class db.t4g.large \
  --availability-zone <new-availability-zone> \
  --db-subnet-group-name tines-db

Step 3. Enable Automatic Failover 

  • Verify that the new instance is part of the cluster and located in a different AZ.

  • Ensure the cluster is set to automatically failover to the secondary instance in case of a failure.

 aws rds modify-db-cluster \
  --db-cluster-identifier <your-cluster-identifier> \
  --apply-immediately \
  --multi-az-enabled 

Step 4. Configure Cluster Parameters for High Availability 

  • Modify the cluster parameter group to optimize settings for high availability.

 aws rds modify-db-cluster-parameter-group \
  --db-cluster-parameter-group-name <your-cluster-parameter-group> \
  --parameters "ParameterName=auto_failover_enabled,ParameterValue=1,ApplyMethod=immediate"

Step 5. Verify Multi-AZ Configuration 

  • Ensure the cluster is now Multi-AZ with automatic failover enabled.

 aws rds describe-db-clusters --db-cluster-identifier <your-cluster-identifier>
Was this helpful?