Skip to content

Unable to launch new instances in any region using Elastic Beanstalk

0

The error always comes back to this:

Environment health has transitioned from No Data to Degraded. Auto Scaling activity failed 8 seconds ago with error: The parameter SecurityGroup is not recognized. Launching EC2 instance failed. At 2025-01-07T11:16:55Z an instance was started in response to a difference between desired and actual capacity, increasing the capacity from 0 to 1. Initialization in progress (running for 18 minutes). There are no instances. Auto Scaling group desired capacity is set to 1.

And the environment becomes unusable. Cannot select any actions for hours.

asked a year ago198 views
2 Answers
0

The issue you're experiencing with Elastic Beanstalk appears to be related to the transition from launch configurations to launch templates, which AWS is implementing for its Auto Scaling service.

Starting October 1, 2024, Amazon EC2 Auto Scaling no longer supports the creation of launch configurations for new accounts. This change affects both new and existing Elastic Beanstalk accounts and environments. The error you're seeing, particularly the "The parameter SecurityGroup is not recognized" message, suggests that your environment might be attempting to use an outdated launch configuration method.

To resolve this issue, you need to configure your Elastic Beanstalk environment to use launch templates instead of launch configurations. Here are some steps you can take:

  1. Set at least one of the following options in your environment configuration:

    • Set the RootVolumeType to gp3
    • Include gp3 in BlockDeviceMappings
    • Set DisableIMDSv1 to true
    • Set EnableSpot to true
  2. Ensure that your IAM user or role has the necessary permissions for working with launch templates. These include:

    • ec2:RunInstances
    • ec2:CreateLaunchTemplate
    • ec2:CreateLaunchTemplateVersions
    • ec2:DeleteLaunchTemplate
    • ec2:DeleteLaunchTemplateVersions
    • ec2:DescribeLaunchTemplate
    • ec2:DescribeLaunchTemplateVersions
  3. If you're still encountering issues, you may need to update your Elastic Beanstalk environment. In the Elastic Beanstalk console, go to your environment's configuration page and look for options related to instance launching or Auto Scaling group settings. Apply the necessary changes to use launch templates.

  4. If the problem persists, you might need to create a new environment using the updated configurations and then swap the environment URL with your current environment.

Remember, these changes are part of AWS's effort to phase out launch configurations in favor of the more flexible and feature-rich launch templates. By updating your environment to use launch templates, you'll not only resolve the current issue but also future-proof your Elastic Beanstalk deployments.
Sources
Launch Templates - AWS Elastic Beanstalk
Release: Elastic Beanstalk starts using Amazon EC2 launch templates on November 25, 2019 - AWS Elastic Beanstalk

answered a year ago
0

Is this part of manually overriding Security Group settings? If there's an ebextension or anything else trying to do this, the field in a Launch Template is SecurityGroupIds

https://docs.aws.amazon.com/cli/latest/reference/ec2/create-launch-template-version.html

Are you setting SecurityGroup as an override/config anywhere?

EXPERT
answered a year 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.