By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Why is Elastic Beanstalk treating my managed update as an immutable deployment

0

I received the following error messages when a managed update was tried to be applied:

`November 15, 2024 02:11:54 (UTC-6) ERROR Service:AmazonCloudFormation, Message:Stack named 'awseb-e-uevcynfxp3-immutable-stack' aborted operation. Current state: 'CREATE_FAILED' Reason: The following resource(s) failed to create: [AWSEBEIP].

November 15, 2024 02:11:54 (UTC-6) ERROR Creating EIP failed Reason: Resource handler returned message: "The maximum number of addresses has been reached. (Service: Ec2, Status Code: 400, Request ID: 1dd86849-47e2-4a3f-b861-9b43fe31099e)" (RequestToken: 8f209802-bd24-424d-05c3-511522194d7c, HandlerErrorCode: GeneralServiceException)

November 15, 2024 02:11:39 (UTC-6) INFO Immutable deployment policy enabled. Launching one instance with the new settings to verify health.

November 15, 2024 02:11:32 (UTC-6) INFO Environment update is starting.

November 15, 2024 02:11:30 (UTC-6) INFO Managed platform update is in-progress.`

The log says an immutable deployment policy is enabled, and it attempts to launch another instance. And I run out of public IP addresses, and the operation fails.

The thing is in my EB configuration settings for this environment I have these settings.

Enter image description here

Since my deployment is set to 'All at once' I'm confused as to why I am encountering this problem. My end goal is to have the managed update applied successfully.

asked 18 days ago25 views
1 Answer
0

The issue you're experiencing is due to the managed platform update process in Elastic Beanstalk, which uses an immutable deployment strategy by default, regardless of your environment's deployment policy setting.

Managed platform updates in Elastic Beanstalk are designed to be safe and minimize impact on your application's availability. To achieve this, they use an immutable deployment mechanism. This means that during the update process, Elastic Beanstalk provisions a new set of instances with the updated platform, rather than updating the existing instances in place.

Even though your environment's deployment policy is set to "All at once," this setting doesn't apply to managed platform updates. The immutable deployment strategy for managed updates is a separate process that ensures your application remains available during the update and allows for easy rollback if issues occur.

The error you're encountering is due to reaching the maximum number of Elastic IP addresses in your AWS account. When Elastic Beanstalk attempts to create a new instance for the immutable update, it's trying to allocate a new Elastic IP, but your account has reached its limit.

To resolve this issue and successfully apply the managed update, you have a few options:

  1. Request an increase in your Elastic IP address limit from AWS Support.
  2. Release any unused Elastic IP addresses in your account.
  3. Temporarily disable managed updates and manually update your environment's platform version using a method that aligns with your "All at once" deployment setting.

It's important to note that managed platform updates are designed to be safe and efficient, so using the immutable deployment strategy is generally beneficial. If you frequently encounter issues with Elastic IP limits, you may want to consider optimizing your use of Elastic IPs or requesting a higher limit from AWS to accommodate these updates.
Sources
AWS Elastic Beanstalk Introduces Managed Platform Updates
Managed platform updates - AWS Elastic Beanstalk
Immutable environment updates - AWS Elastic Beanstalk

profile picture
answered 18 days 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