Skip to content

Elastic Beanstalk no EC2 instance when using Amazon Linux 2023

0

Hello,

I have an Elastic Beanstalk environment with Corretto 11 and Amazon Linux 2. Now I want to upgrade to Corretto 21. It seems that only Amazon Linux 2023 supports Corretto 21.

Unfortunately whenever I create a new environment with Amazon Linux 2023 no EC2 instance gets started. It takes very long (approx. 40 min) and then I see the following error (I have used the standard roles proposed by the wizard): Enter image description here

I have tested different versions of Corretto (21, 17) with the standard application and Linux 2023. Non is working. Whenever I select Amazon Linux 2, everything works well. The environment is created successfully. Unfortunately Corretto 21 is then not supported.

Does anyone have an idea what the issue might be?

Thank you

Philipp

1 Answer
1

The issue you're experiencing with Elastic Beanstalk not starting EC2 instances when using Amazon Linux 2023 could be related to a configuration problem or compatibility issue. Here are a few points to consider and potential solutions:

  1. AMI Configuration: The error message suggests there might be a problem with the Amazon Machine Image (AMI) configuration. This could be due to an outdated or incompatible AMI being referenced in your environment settings.

  2. Custom AMI: If you're using a custom AMI, ensure it's compatible with Amazon Linux 2023 and the Corretto version you're trying to use.

  3. Environment Update: Try updating your existing environment instead of creating a new one. You can use the AWS CLI to update the environment with a new AMI ID that's compatible with Amazon Linux 2023.

  4. Platform Version: Make sure you're using the latest platform version that supports Amazon Linux 2023 and Corretto 21. As of recent updates, there is a new Corretto 21 platform branch running on AL2023.

  5. Security Updates: Ensure that all security updates are applied to your environment. Recent platform updates have included security patches and cross-platform updates that might resolve your issue.

  6. CLI Update: If you're using the AWS CLI to manage your Elastic Beanstalk environment, make sure you're using the most recent version to avoid any compatibility issues.

To resolve the issue, you could try the following steps:

  1. Create a new custom AMI compatible with Amazon Linux 2023.

  2. Install the latest version of AWS CLI on your local machine.

  3. Use the AWS CLI to update your Elastic Beanstalk environment with the new AMI ID. The command would look something like this:

    aws elasticbeanstalk update-environment --environment-name your_env_name --option-settings Namespace=aws:autoscaling:launchconfiguration,OptionName=ImageId,Value=your_new_ami_id --region your_region

Replace the placeholders with your actual environment name, new AMI ID, and AWS region.

If the problem persists after trying these steps, you may need to contact AWS support for further assistance, as there could be underlying issues specific to your account or region.
Sources
Resolve Configuration validation exception error in Elastic Beanstalk | AWS re:Post
Release: Elastic Beanstalk launches Amazon Linux 2023 new platform releases and updates on January 25, 2024 - AWS Elastic Beanstalk
Release: Elastic Beanstalk Amazon Linux 2023 platform updates on February 22, 2024 - AWS Elastic Beanstalk

answered 10 months ago
EXPERT
reviewed 10 months 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.