Deleting a blue/green deployment - Amazon Aurora
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Deleting a blue/green deployment

You can delete a blue/green deployment before or after you switch it over.

When you delete a blue/green deployment before switching it over, Amazon RDS optionally deletes the DB cluster in the green environment:

  • If you choose to delete the DB cluster in the green environment (--delete-target), it must have deletion protection turned off.

  • If you don't delete the DB cluster in the green environment (--no-delete-target), the cluster is retained, but it's no longer part of a blue/green deployment. Replication continues between the environments.

The option to delete the green databases isn't available in the console after switchover. When you delete blue/green deployments using the Amazon CLI, you can't specify the --delete-target option if the deployment status is SWITCHOVER_COMPLETED.

Important

Deleting a blue/green deployment doesn't affect the blue environment.

You can delete a blue/green deployment using the Amazon Web Services Management Console, the Amazon CLI, or the RDS API.

To delete a blue/green deployment
  1. Sign in to the Amazon Web Services Management Console and open the Amazon RDS console at https://console.amazonaws.cn/rds/.

  2. In the navigation pane, choose Databases, and then choose the blue/green deployment that you want to delete.

  3. For Actions, choose Delete.

    The Delete Blue/Green Deployment? window appears.

    Delete blue/green deployment

    To delete the green databases, select Delete the green databases in this Blue/Green Deployment.

  4. Enter delete me in the box.

  5. Choose Delete.

To delete a blue/green deployment by using the Amazon CLI, use the delete-blue-green-deployment command with the following options:

  • --blue-green-deployment-identifier – The resource ID of the blue/green deployment to be deleted.

  • --delete-target – Specifies that the DB cluster in the green environment is deleted. You can't specify this option if the blue/green deployment has a status of SWITCHOVER_COMPLETED.

  • --no-delete-target – Specifies that the DB cluster in the green environment is retained.

Example Delete a blue/green deployment and the DB cluster in the green environment

For Linux, macOS, or Unix:

aws rds delete-blue-green-deployment \ --blue-green-deployment-identifier bgd-1234567890abcdef \ --delete-target

For Windows:

aws rds delete-blue-green-deployment ^ --blue-green-deployment-identifier bgd-1234567890abcdef ^ --delete-target
Example Delete a blue/green deployment but retain the DB cluster in the green environment

For Linux, macOS, or Unix:

aws rds delete-blue-green-deployment \ --blue-green-deployment-identifier bgd-1234567890abcdef \ --no-delete-target

For Windows:

aws rds delete-blue-green-deployment ^ --blue-green-deployment-identifier bgd-1234567890abcdef ^ --no-delete-target

To delete a blue/green deployment by using the Amazon RDS API, use the DeleteBlueGreenDeployment operation with the following parameters:

  • BlueGreenDeploymentIdentifier – The resource ID of the blue/green deployment to be deleted.

  • DeleteTarget – Specify TRUE to delete the DB cluster in the green environment or FALSE to retain it. Cannot be TRUE if the blue/green deployment has a status of SWITCHOVER_COMPLETED.