Elasticbeanstalk Status "Ready" but cant deploy "ERROR: InvalidParameterValueError - Environment named <environment-name> is in an invalid state for this operation. Must be Ready"

0

A database was updated outside of elasticbeanstalk. This happened about 6 months ago. Now the environment cant be updated in any way though the environment status according to all the describe apis is "Ready". How do I see what is stopping the environment from being "Ready?"

I should note that the environment is up and running I am not able to update it any longer. Its an environment that is actively used. I cant take it down to rebuild.

Environment details for: oms-dev
  Application name: oms
  Region: us-east-2
  Deployed Version: xxx
  Environment ID: xxx
  Platform: arn:aws:elasticbeanstalk:us-east-2::platform/Python 3.8 running on 64bit Amazon Linux 2/3.3.4
  Tier: WebServer-Standard-1.0
  CNAME: xxx.us-east-2.elasticbeanstalk.com
  Updated: 2022-10-22 04:58:05.328000+00:00
  Status: Ready
  Health: Green

The accused event

INFO
Environment health has transitioned from Info to Ok.
2022-10-21 19:24:56 UTC-0700	
INFO
Environment health has transitioned from Ok to Info. Command is executing on all instances.
2022-10-21 17:36:04 UTC-0700	
INFO
Environment health has transitioned from Warning to Ok.
2022-10-21 17:33:14 UTC-0700	
ERROR
Rollback of environment oms-dev failed. Reason: The following resource(s) failed to update: [AWSEBRDSDatabase].
2022-10-21 17:33:14 UTC-0700	
ERROR
Updating RDS database named: aa11rysxnzln31k failed Reason: Invalid storage size for engine name postgres and storage type standard: 10 (Service: Rds, Status Code: 400, Request ID: xxx)
2022-10-21 17:32:04 UTC-0700	
WARN
Environment health has transitioned from Info to Warning. Configuration update is aborting (running for 3 minutes).
2022-10-21 17:30:55 UTC-0700	
ERROR
Failed to deploy configuration.
2022-10-21 17:30:55 UTC-0700	
ERROR
Updating RDS database named: aa11rysxnzln31k failed Reason: Invalid storage size for engine name postgres and storage type standard: 10 (Service: Rds, Status Code: 400, Request ID: c33d9c87-eeb9-44f0-99e0-eb2c4c91f11a)
2022-10-21 17:30:55 UTC-0700	
ERROR
Service:AmazonCloudFormation, Message:Stack named 'xxx' aborted operation. Current state: 'UPDATE_ROLLBACK_IN_PROGRESS' Reason: null
Brett
asked a year ago963 views
1 Answer
0

Hello

Thank you for contacting AWS premium support.

I understand that you after you updated a database outside of beanstalk environment, you are unable to update the environment and getting below error :

——

ERROR Updating RDS database named: aa11rysxnzln31k failed Reason: Invalid storage size for engine name postgres and storage type standard: 10 (Service: Rds, Status Code: 400, Request ID: xxx) 2022-10-21 17:32:04 UTC-0700

——

Since the RDS Database has been modified outside of the Elastic Beanstalk, the configuration data between Beanstalk environment and RDS database may be conflicting. As you might have already know, under the hood, Elastic Beanstalk uses CloudFormation to create and manage the application's various AWS resources. The changes that are made outside of CloudFormation can complicate stack update or deletion operations.

That being said, In order to troubleshoot this issue, you will have to set your Elastic Beanstalk's environment to match up as close as to what your RDS database instance is configured. Please set your storage size in your Elastic Beanstalk configuration to match the storage size of RDS database instance and save it, this should have Elastic Beanstalk effectively sync up with the RDS database instance. When it applies, CloudFormation should resize the database.

If the above approach does not work, then you can opt for any of the below two options :-

  1. Create a snapshot of the existing RDS DB instance and then create a new Elastic Beanstalk environment using this snapshot.

  2. Decouple the RDS instance from the environment. This is recommended for production environments because the lifecycle of the DB is not tied to the lifecycle of the environment [1].

For option 2, you could also refer to the documentation here [2] for detailed steps on how to decouple the RDS instance from the environment. For details on launching and connecting to external RDS instance, you can also refer to the details in the documentation here [3].

Having said this, in case you are still not able to update your environment, we would need to check the environment and account specific details in order to further troubleshoot the issue. Therefore, I would recommend you to raise a support case with us. You can use below link for the same : https://support.console.aws.amazon.com/support/home#/case/create

Thank you!

References:-

[1] https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.RDS.html [2] https://aws.amazon.com/premiumsupport/knowledge-center/decouple-rds-from-beanstalk/ [3] https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/rds-external-defaultvpc.html

AWS
SUPPORT ENGINEER
answered a year 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