How to delete old blue instance after switchover on RDS?

0

I've completed the blue/green deployment and switched my green instance over. Now, I have "old blue" (the old database with the previous MySQL version) and "new blue" (the live database with the updated MySQL version).

I want to remove "old blue" and make "new blue" a normal instance where it doesn't say "blue" anymore. The AWS guide I found doesn’t specifically mention "old blue."

Would deleting the "old blue" writer instance be the correct approach?

What I see currently:

-- db-old1 (Old blue)
---- db-instance-1-old1 (Old blue)
-- bg-deployment-1
---- dbprod (New blue)
---- dbprod-instance-1 (New blue)
2 Answers
1
Accepted Answer

After completing a blue/green deployment and switchover in Amazon RDS, you can safely delete the old blue instance and remove the blue/green deployment association from your new production instance. Here's how to proceed:

  1. First, delete the blue/green deployment itself. This action will not delete your new production instance (the "new blue"). You can do this using the AWS Management Console, AWS CLI, or RDS API.

  2. When you delete the blue/green deployment, an instance with "-old1" at the end of its name will remain. This is your "old blue" instance.

  3. After deleting the blue/green deployment, you can safely delete the "old blue" instance (db-old1 and db-instance-1-old1 in your case) without affecting your new production database.

  4. To delete the "old blue" instance, you can use the standard RDS instance deletion process. Make sure to turn off deletion protection if it's enabled.

  5. When deleting the "old blue" instance, you have the option to create a final snapshot if you want to retain the ability to restore it later.

  6. After these steps, your "new blue" instance (dbprod and dbprod-instance-1) will no longer be associated with the blue/green deployment and will function as a normal RDS instance.

It's important to note that deleting the blue/green deployment doesn't affect your new production environment. The "new blue" instance will continue to operate normally, and the "blue" designation will be removed from its description once the deployment is deleted.

Remember to exercise caution when deleting database instances and always ensure you have proper backups before proceeding with any deletion operations.
Sources
Need to delete RDS blue green deployment | AWS re:Post
Deleting a blue/green deployment in Amazon RDS - Amazon Relational Database Service
Deleting a DB instance - Amazon Relational Database Service

profile picture
answered 14 days ago
profile picture
EXPERT
reviewed 13 days ago
  • I will wait for a confirmation. Is it right that I can delete "bg-deployment-1" even though the New Blue (live DB) is under it in the tree view?

1

Hello.

I'll attach the answers I've tried in the past.
After deleting the blue/green deployment, delete the old instance and you're done.
https://repost.aws/questions/QU9CnlxnzdQMW51AlSNL9PKw/need-to-delete-rds-blue-green-deployment

I will wait for a confirmation. Is it right that I can delete "bg-deployment-1" even though the New Blue (live DB) is under it in the tree view?

Yes, it is possible to delete "bg-deployment-1".
If you delete "bg-deployment-1" which is a blue/green deployment, "db-instance-1-old1" and "dbprod-instance-1" will remain.

profile picture
EXPERT
answered 13 days 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.

Guidelines for Answering Questions