How to fix invalid Elastic Beanstalk configuration / deployments

Posted by Matt Bryson on 25-Sep-2017 10:45:06
Find me on:

Recently some of our Elastic Beanstalk deployments suddenly started failing. It turns out it was a change to EB's configuration validation which caused some misleading error messages.

A few of our non-production environments have an EB managed database to make life easier, and it was these that were failing.

The error was related to a configuration mismatch with the RDS set up:

Updating RDS database named: {NAME REDACTED}
failedReason: RDS does not support creating a DB instance with the following combination:
DBInstanceClass=db.t1.micro, Engine=mysql, EngineVersion=5.7.17, LicenseModel=general-public-license.
For supported combinations of instance class and database engine version, see the documentation.


This was misleading for various reasons: we were not trying to create a new RDS instance, we hadn’t modified the RDS set up and the only changes since the last successful deployment were application code changes.

It appears that a recent update to EB had tightened the validation of the EB configuration, which now fails with such a conflict.


How did it get into a conflicting state?

Some time ago it was necessary to update the version of MySQL – this was not possible via EB, so had to be done via the RDS console, which worked fine.

EB picked-up the version change, but AWS had retired the t1 DB instance that we were running on, so as part of the update it upgraded the instance to a t2.

It was the change to the DB instance class that EB did NOT pick up on. From this point on, RDS was using a t2, but EB thought it was using a t1 on the latest version number, which was not allowed.

This wasn’t an issue until very recently, but due to the new EB configuration validation error, we couldn’t change the configuration in the EB console, as it was invalid.


The solution

It was easily fixed using the EB CLI to update the configuration to match that of the RDS


$ aws elasticbeanstalk update-environment --environment-name {YOUR_ENV_NAME} --option-settings Namespace=aws:rds:dbinstance,OptionName=DBInstanceClass,Value=db.t2.micro --profile {YOUR_PROFILE} --region {YOUR_REGION}


Once done the EB console shows the correct configuration, and the deployments carried on successfully.

During this, it was also noticed that the EB console now warns that you should not modify the RDS settings outside of EB!

If only they had that warning last year :)



Topics: AWS, Deployment, EB (Elastic Beanstalk), Elasticbenastalk

About the author

Matt Bryson is an experienced systems engineer with over 15 years Development and Systems Operations experience.

Product Briefing

In this short product briefing, see how iDetailAid customers are simplifying the creation, update, localisation and upload of CLM content.

New Call-to-action

Subscribe to Email Updates

Recent Posts