AWS Blue/Green Deployment Failover Guide

How to Fix AWS Quick Data Preview Issue for Iceberg Tables in Athena

If you’re having trouble during a database switchover, it’s likely because your blue/green deployment is running into issues caused by certain changes on the blue database. Specifically, changes like creating, altering, or dropping database objects (called DDL changes) or modifying large objects can cause problems, especially if they happen after you’ve set up your deployment.

During a switchover, Amazon RDS checks for these kinds of changes and will prevent the process if it detects any. This is because blue/green deployment doesn’t support making DDL changes during the ongoing replication process.

Here’s how you can fix this problem:

First, you’ll need to delete your current blue/green setup, including the green environment, to clear the issue. Then, recreate the deployment from scratch. Going forward, avoid making any DDL changes or large object modifications on the blue database while the deployment is active. This means no creating, changing, or deleting database objects during the deployment process.

To avoid encountering this problem in future deployments, you can set up event triggers and trigger functions on your blue database before starting the deployment. These triggers will notify you if someone attempts to make DDL changes, giving you a heads-up so you can pause those changes until after the switchover is complete.

If you’re seeing errors related to replication slots, don’t worry. These are normal. Amazon RDS manages the replication slots automatically through the ‘rds’ namespace, so you don’t need to set them up yourself. As long as no DDL changes happen after you create the deployment, the switchover should go smoothly.

The main point is to keep the blue database stable, with no schema changes, from the time you set up the deployment until the switchover is finished. Following these steps will help ensure your blue/green updates go smoothly without errors.