Professional Documents
Culture Documents
Blue/Green
Deployment
For Database Updates
A how to example to Automate AWS RDS
Database Version Upgrade
When a blue/green deployment is created, one specifies the source DB instance to copy in the
deployment. The DB instance choosed is the production DB instance, and it becomes the primary DB
instance in the blue environment. This DB instance is copied to the green environment, and RDS
configures replication from the DB instance in the blue environment to the DB instance in the green
environment.
In this howto, the AWS RDS MySQL database will be upgraded from 8.0.33 to 8.0.34
The Source AWS RDS db (assuming production database) should be enabled backups.
Currently Blue/Green Deployments are supported only for RDS for MariaDB, RDS for MySQL, and RDS
for PostgreSQL. (Please check also for in region availability). This howto only applies to AWS RDS not
Aurora.
Note: Please read and understand the official documentation to perform this exercise in Production
Let us begin:
The current version is 8.0.33, now will check Valid Upgrade Target Engine Version that we can
upgrade.
The db can be upgraded to those version butr requirement is to upgrade to MySQL 8.0.34.
From AWS console browse to RDS select current db and click on configuration tab
Both current version and option group can be found as option group will be needed for Blue/Green
deployments.
This will retun blue/green deployment identifier and status, the identifier will be used from cli to check
progress of deployment.
blue-green-deployment-identifier bgd-v53303651eexfake
aws rds describe-blue-green-deployments \
--blue-green-deployment-identifier bgd-v53303651eexfake
A new read replica of source is being created , once created the replication under the hood is
established.
Check status :
aws rds describe-blue-green-deployments \
--blue-green-deployment-identifier bgd-v53303651eexfake
Replica is sucessfully completed and Upgrade is in progress.
Blue: dxb-mysql8e.cr10kl5snwf2.me-central-1.rds.amazonaws.com
Green: dxb-mysql8e-green-r43j0a.cr10kl5snwf2.me-central-1.rds.amazonaws.com
Blue:
Green:
Now that new Green has the desired EngineVersion 8.0.34, switchover timeout period can be
specified between 30 seconds and 3,600 seconds (one hour). If the switchover takes longer than the
specified duration, then any changes are rolled back and no changes are made to either
environment. The default timeout period is 300 seconds (five minutes).
Check Blue:
Blue : dxb-mysql8e.cr10kl5snwf2.me-central-1.rds.amazonaws.com