can not update beanstalk as it keeps looking for a deleted database

0

We have EC2 instance, Beanstalk setup, RDS databases.

We recently added a database on the RDS. In that process, I also added a database to the EC2 instance (or at least a database in the Beanstalk itself). I then deleted this database, but for some reason it keeps trying to use it and complains about it, meaning that we can not update any details in our configuration.

When I turn off the feature "do health check or roll back" it still rolls back because it thinks the instance does not start nicely.

I think the issue is that I deleted the created RDS database, but in beanstalk there is no option to delete the database properly.

asked 2 years ago465 views
1 Answer
0

Hi There,

I understand that you recently added a database on RDS. In that process, you also added a database to the EC2 instance (or at least a database in the Beanstalk itself). you then deleted this database, but for some reason it keeps trying to use it and complains about it, meaning that you can not update any details in your configuration.

Please note that Deletion protection is enabled for you when you use the AWS Management Console to create a production DB instance. However, Amazon RDS enforces deletion protection when you use the console, the CLI, or the API to delete a DB instance.

In order to successfully and correctly delete an RDS instance from beanstalk you need to first decouple this RDS DB instance from beanstalk. You can decouple your database from an Elastic Beanstalk environment without affecting the health of the environment, please follow the document here. [1]

You can choose to create a snapshot of the database and then terminate it, retain the database operational as a standalone database external to Elastic Beanstalk, or permanently delete the database. The Database deletion policy setting determines this result.

I suggest that in your case, you decouple all databases attached to beanstalk using The Database deletion policy setting. Choose delete for the rds you plan to delete and choose retain for the one you need to keep. Then clean up your beanstalk so you can create a new one that you can then attach the necessary resources to.[2]

I hope this information is helpful to you.

=================References===================

[1] Decoupling an RDS DB instance using the console: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing.db.html#using-features.decoupling.db

[2] Clean up: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/GettingStarted.Cleanup.html

Please note that I personally value your feedback, please accept and thumbs up this answer if you find it helpful.

Mfanelo
answered 2 years 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