How to delete the db configuration from elastic bean stalk

0

I created an RDS instance using Elastic Beanstalk, but I deleted the instance manually. Now, I can't update any of my environment variables. It throws the error: "Updating Auto Scaling group - failed. Reason: Unable to retrieve Endpoint.Address attribute for AWS::RDS::DBInstance, with error message DBInstance awseb-e-k9ppy34qns-stack-awsebrdsdatabase-xxxxx not found."

How can I fix my Elastic Beanstalk environment? One solution is to clone the environment and use the clone, but is there another way?

  • please accept the answer if it was useful

1 Answer
0

Here’s how you can address the issue without necessarily cloning the environment:

1. Remove RDS Configuration from Environment:

  • Open the Elastic Beanstalk console.
  • Navigate to your application and select the affected environment.
  • Under the "Configuration" section, find the category that includes "Database" and click on it.
  • If the database option allows you to remove or modify the settings, adjust them to no longer point to the deleted RDS instance. However, in most cases, if the RDS was set up as part of the environment creation, you might not be able to directly edit these settings.

2. Use the EB CLI to Update Environment Settings:

  • If the AWS Management Console doesn’t allow you to remove the RDS configuration, you can use the Elastic Beanstalk Command Line Interface (EB CLI) to try and update the environment settings.
  • First, ensure you have the EB CLI installed. If not, install it following the official AWS documentation.
  • Once installed, you can use the following command to remove the database settings:
eb setenv RDS_HOSTNAME=null RDS_PORT=null RDS_DB_NAME=null RDS_USERNAME=null RDS_PASSWORD=null
  • This command attempts to overwrite the environment variables related to the RDS configuration with null values, essentially trying to clear them out.

3. Modify Environment Configuration Files:

  • Another approach is to modify the configuration files directly via the Elastic Beanstalk environment management console.
  • Go to the "Configuration" section, and under "Software," look for environment properties. Remove any properties related to the RDS instance.

4. Contact AWS Support:

  • If none of the above methods resolve the issue, contacting AWS Support might be necessary. They can assist in removing the stale references from your Elastic Beanstalk environment directly.
profile picture
EXPERT
answered 16 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