Error on deploy Elastic Beanstalk

2

We went to do a new Deploy and an error occurred.

1 - I accessed Elastic Beanstalk 2 - Select the "Sistemagenesis4-env" environment 3 - Click on the "Upload and Deploy" button 4 - Select the compressed file 5 - I clicked on "Deploy" as we always did

But this error appeared.

"Error when trying to upload and deploy a new version to the environment This change will require that each of your existing EC2 instances be replaced for the settings to take effect. Changes to option DisableIMDSv1 settings will not take effect immediately. Each of your existing EC2 instances will be replaced and your new settings will take effect then."

Insira a descrição da imagem aqui

  • I am also experiencing this issue, seemingly out of the blue, on instances that have not had their configurations updated in quite some time.

  • Same issue, no change in configuration. Seems like the disable IMDSv1 is checked in the Configuration

Thiago
asked a month ago1359 views
4 Answers
3
Accepted Answer

I had (have) the same issue. I tried restarting the App Server and rebuilding the environment, neither of which resolved the message. I'm not sure what the warning message means, however, I did find a way to upload an updated version of an app. Rather than using the Upload and Deploy, do the following:

  • Within your EB environment, click on Application versions in the left panel
  • Click Upload in top right to upload the latest version of your app
  • After you upload your app, select it and then under Actions choose Deploy

After a few minutes your new app should be deployed to the environment.

Hope this helps.

profile picture
Grace
answered a month ago
  • We have exactly the same issue. Thanks for the tip @Grace, your workaround worked for me.

  • Thanks! Workaround works.

1

The error might be occurring because the Elastic Beanstalk environment is configured to disable the older version of the EC2 instance metadata service (IMDSv1), requiring a restart with new instances that use the updated version (IMDSv2). This change cannot be applied to running instances and necessitates their replacement to enhance security and take effect.

In order to fix this, you must allow Elastic Beanstalk to replace the existing EC2 instances, which can be done by proceeding with the deployment process. The service will then automatically handle the replacement of instances, but be prepared for potential downtime unless you've configured your environment for zero-downtime deployments.

Key Sources:

profile picture
EXPERT
answered a month ago
  • Osvalde can you elaborate on how we can proceed with the deployment process? As you can see in the OP, all we see is an error in the red banner with no option to move forward.

0

But we didn't make any changes, suddenly this error appeared, can you explain to me why?

Thiago
answered a month ago
  • it weird because the error message suggests that there has been a change in the Elastic Beanstalk environment configuration, specifically regarding the EC2 instance metadata service (IMDS).

0

Just to provide a little feedback. We are running two different Elastic Beanstalk environments

  1. Environment 1 a. Environment 1 runs an EC2 instance with the IMDSv1 Enabled b. Environment 1 behaves exactly as Thiago described c. We did not re-configured the IMDSv1 on the EC2 instance. Deployments has been always smooth and now show the problem reported. Seems like Elastick Beanstalk is behaving in a different way now if the EC2 instance has de IMDSv1 Enabled. d. The workaround described by Grace works exactly as described and the application is deployed

  2. Enviroment 2 a. Environment 2 runs an EC2 instance with the IMDSv1 Disabled b. Deployments run smoothly as always. No need of workaround

Question to Oswaldo Marte or any other Expert. ¿Is AWS supposed to disable the IMDSv1 on Elastic Beanstalk EC2 instances or should we do these job manually?

answered a month ago
  • One final piece of feedback to close the issue: Seems like AWS fixed Elastic Beanstalk behaviour. We have been able to deploy the application through the standard process (no need of Grace Workaround) on Environment 1 which still has IMDSv1 Enable. Everything is back to normal now.

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