I created an Elastic Beanstalk via the wizard and it made an an Amazon RDS database that I didn't use because we have our DB instances in a different RDS outside of Elastic Beanstalk.
I deleted the RDS instance which made the environment unstable and we couldn't use it anymore. However, we made a new environment and everything worked out.
Now, I am trying to terminate this other Beanstalk which we can't/won't use but it keeps failing the termination. As far as I could figure, it seems like when the RDS was created, the retention was set at 'take a snapshot', now that the RDS doesn't exist, it can't take a snapshot and fails terminating the environment.
All I need to do is get rid of this environment because it is just sitting there. How do I go about solving this problem?
For reference this is what the error logs look like:
2018-06-05 14:00:41 UTC-0500 ERROR Stack deletion failed: The following resource(s) failed to delete: [AWSEBRDSDatabase].
2018-06-05 14:00:41 UTC-0500 ERROR Deleting RDS database named: aa1ipjn4c8bwak9 failed Reason: DBInstance aa1ipjn4c8bwak9 not found. (Service: AmazonRDS; Status Code: 404; Error Code: DBInstanceNotFound; Request ID: f8f17442-bd41-4188-9c7e-9408a5398a92)
2018-06-05 14:00:24 UTC-0500 INFO rebuildEnvironment is starting.
2018-06-01 14:21:01 UTC-0500 ERROR Stack deletion failed: The following resource(s) failed to delete: [AWSEBRDSDatabase].
2018-06-01 14:21:01 UTC-0500 ERROR Deleting RDS database named: aa1ipjn4c8bwak9 failed Reason: DBInstance aa1ipjn4c8bwak9 not found. (Service: AmazonRDS; Status Code: 404; Error Code: DBInstanceNotFound; Request ID: 0dba0c59-473f-4814-a6dd-2af7847be6c0)
In the navigation pane, choose Configuration. In the Instances configuration category, choose Edit. Under EC2 security groups, choose the security group to attach to the instances, in addition to the instance security group that Elastic Beanstalk creates. Choose Apply.
You can use Elastic Beanstalk with Amazon Relational Database Service (Amazon RDS) to set up, operate, and scale a relational database.
You may be able to create a new RDS instance named aa1ipjn4c8bwak9
and then delete the environment. I had to do something similar when I switched from the default ELB to an ALB.
I wish that EB didn't default to creating a database with the environment - in any sort of production environment, it's almost certainly a bad idea.
Open the AWS CloudFormation console.
In the navigation pane, choose Stacks.
In the Stack name column, select the stack for the Elastic Beanstalk environment that you want to delete.
Note: In the Status column for your stack, you should see DELETE_FAILED.
Tip: You can identify your stack by verifying that the environment ID from the Description column in the AWS CloudFormation console matches the environment ID of your Elastic Beanstalk environment.
Choose Delete.
In the pop-up window, select the AWSEBRDSDatabase check box in the Resources to retain - optional section, and then choose Delete Stack.
Source:- AWS Knowledge Centre
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With