Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS EB Error: Incorrect application version found on all instances

I am trying to use the EB CLI to deploy an application into an environment but I seem to be getting strange errors. Is there a way to empty out previous application versions so I can upload a fresh application?

The message I see after I execute eb deploy.

Update environment operation is complete, but with errors. For more information, see troubleshooting documentation.

I am currently getting this error:

Incorrect application version found on all instances. Expected version [app version]

The logs file also seems to be getting deleted for some reason.

like image 751
Daniel Sun Yang Avatar asked May 08 '16 20:05

Daniel Sun Yang


People also ask

How many application versions does Elastic Beanstalk allow you to store?

Elastic Beanstalk applies an application's lifecycle policy each time you create a new application version, and deletes up to 100 versions each time the lifecycle policy is applied.

How does AWS Elastic Beanstalk distinguish between version releases?

AWS Elastic Beanstalk uses proven AWS features and services, such as Amazon EC2, Amazon RDS, Elastic Load Balancing, Auto Scaling, Amazon S3, and Amazon SNS, to create an environment that runs your application. The current version of AWS Elastic Beanstalk uses the Amazon Linux AMI or the Windows Server 2019.


3 Answers

I solved this by doing an instance reboot. Redeploy worked well after reboot.

enter image description here

like image 133
Jeff Gu Kang Avatar answered Sep 16 '22 13:09

Jeff Gu Kang


The operation completed but there were errors means that your deployment did not succeed. When an application update is unsuccessful eb will keep using the last good version. So if the last good version is 48 but this deployment is 55 and eb is expecting 54, then that "error" will be present... More of a warning than an error.

Something in your application is causing the application update to fail... Use the GUI to get the full logs which will reveal the error... Fix the error and when your deployment is successful your "Incorrect application version" error will resolve.

like image 36
hephalump Avatar answered Sep 17 '22 13:09

hephalump


I found out that the issue was due to incompleteness of the permissions granted to the codepipeline/deployment service role.

You should grant UpdateApplicationversion permission to the associated elastic beanstalk resources for the role that you use to deploy your app.

like image 42
informeto Avatar answered Sep 20 '22 13:09

informeto