aws-eb

Fixing the Elastic Beanstalk application version error

If you’re using the Amazon Web Service CLI tools to push new version of your Elastic Beanstalk application you might eventually run into the following error:

remote: error: Unable to create application version:
Invalid unicode xml character in CreateApplicationVersionMessage.Description at index 13

or

! [remote rejected] HEAD -> master (hook declined)

For me, there was a quick and relatively easy fix. The error comes from too many versions of your application being stored on Elastic Beanstalk (limit is 500) — so first log in to your AWS Managemnt Console (aws.amazon.com/console) and go to Elastic Beanstalk. In the Application section, click on the Versions tab and remove some old versions. Next, make a small change to a file in your repo and commit and push. Now your git aws.push will successfully deploy your new version to the cloud.

There are some solutions out there to automatically clean up old versions on EB using the AWS SDK, but that’s for another time.

Happy coding!