Skip to content

AWS PostgreSQL RDS Blue GreenDeployment and Aurora

0

We have an AWS RDS instance running on PostgreSQL version 13.15. This has a read-replica as well as an Aurora cluster attached to it. If we test Blue/Green deployment on this, the primary server as well as read replica get upgraded (to version 16.3). The Aurora cluster continues to be attached to the Blue environment. How should the Aurora cluster be handled so that it is either attached to the new server on 16.3 and/or gets upgraded?

1 Answer
0

When performing a Blue/Green deployment to upgrade your AWS RDS PostgreSQL instance from version 13.15 to 16.3, you're correct that the primary server and read replica in the Green environment will be upgraded. However, the Aurora cluster attached to your RDS instance presents a unique situation that requires additional consideration.

Blue/Green deployments for RDS PostgreSQL do not automatically handle attached Aurora clusters. The Aurora cluster will indeed remain attached to the Blue (original) environment after the switchover. To address this, you have a couple of options:

  1. Migrate the Aurora cluster to the new RDS instance: After the Blue/Green deployment is complete and you've switched over to the new 16.3 environment, you'll need to manually set up a new Aurora cluster that replicates from your upgraded RDS instance. This involves creating a new Aurora cluster, configuring it to use the upgraded RDS instance as its replication source, and then cutting over your applications to use the new Aurora cluster once replication is caught up.

  2. Upgrade the Aurora cluster separately: If your Aurora cluster is using a compatible version, you could perform a separate Blue/Green deployment or in-place upgrade for the Aurora cluster itself. This would involve: a. Creating a Blue/Green deployment for the Aurora cluster b. Upgrading the Green environment of the Aurora cluster to PostgreSQL 16.3 c. Testing the upgraded Aurora cluster d. Switching over to the upgraded Aurora cluster

It's important to note that these processes will need to be carefully coordinated with your RDS upgrade to ensure data consistency and minimize downtime. The exact steps and timing will depend on your specific setup and requirements.

In either case, you'll need to plan for:

  • Potential downtime or read-only periods for the Aurora cluster during the transition
  • Updating any connection strings or endpoints in your applications
  • Testing thoroughly to ensure compatibility with the new PostgreSQL version

Given the complexity of this scenario involving both RDS and Aurora, it's highly recommended to perform a test run in a non-production environment first. This will help you identify any potential issues and refine your upgrade process before applying it to your production systems.

Remember that Blue/Green deployments, while powerful, don't automatically solve all upgrade scenarios, especially in complex setups involving multiple database technologies. Careful planning and potentially some manual steps are required to ensure a smooth transition for all components of your database architecture.

Sources
Time for Blue/Green deployment | AWS re:Post
Using Amazon Aurora Blue/Green Deployments for database updates - Amazon Aurora
PostgreSQL 11 upgrade strategies for Amazon Aurora PostgreSQL and Amazon RDS for PostgreSQL | AWS Database Blog
Overview of Amazon Aurora Blue/Green Deployments - Amazon Aurora

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.