Skip to content

Creating an Elastic Beanstalk without success

1

Hello, I am new to using Elastic Beanstalk. I am trying to create an environment but i get these errors

Creating Auto Scaling launch configuration failed Reason: Resource handler returned message: "The Launch Configuration creation operation is not available in your account. Use launch templates to create configuration templates for your Auto Scaling groups. (Service: AutoScaling, Status Code: 400, Request ID: 91c798e6-3adf-49ac-90ea-7f195ea555a9)" (RequestToken: 29b83ea2-c0ae-b805-34e2-af3153e9e0b6, HandlerErrorCode: GeneralServiceException)

Stack named 'awseb-e-dcjhm3nklm-stack' aborted operation. Current state: 'CREATE_FAILED' Reason: The following resource(s) failed to create: [AWSEBAutoScalingLaunchConfiguration].

and

Service:AmazonCloudFormation, Message:Resource AWSEBAutoScalingGroup does not exist for stack awseb-e-dcjhm3nklm-stack

I have setup an EC2 security group and a key-pair which i used during the environment configuration. It is my first time trying to deploy an application to EB. Can you please give me some guidelines if this rings a bell? Thanks

asked 2 years ago3.2K views

3 Answers
1

I had the same issue and worked for me after trying for days was to:

  1. DisableIMDSv1
  2. Setting RootVolumeType to: gp3 I hope that helps

answered 2 years ago

EXPERT

reviewed 2 years ago

EXPERT

reviewed 2 years ago

  • how did you disable this? I tried setting up a .config file in .ebextensions folder like so

    option_settings: aws:autoscaling:launchconfiguration: DisableIMDSv1: true aws:ec2:instances: RootVolumeType: gp3

    but still doesnt work

  • It work for me thanks, you save my time!

1

The errors you're encountering are related to recent changes in AWS Elastic Beanstalk regarding the use of launch configurations. AWS is phasing out launch configurations and replacing them with launch templates. As part of this transition, creating new launch configurations is no longer possible in accounts and regions where Elastic Beanstalk environments don't exist already.

To create your Elastic Beanstalk environment, you need to configure your environment to use launch templates instead of launch configurations. Here's what you can do:

  1. When creating your Elastic Beanstalk environment, set at least one of the following options in your environment configuration:
  • DisableIMDSv1
  • RootVolumeType
  • BlockDeviceMappings
  • EnableSpot
  1. You can set these options through the Elastic Beanstalk console, AWS CLI, or API calls when creating your environment.

  2. For example, if you're using the AWS CLI, you could add an option setting like this:

--option-settings Namespace=aws:autoscaling:launchconfiguration,OptionName=RootVolumeType,Value=gp2
  1. If you're using the Elastic Beanstalk console, you can find these options under the "Capacity" configuration section when creating or updating your environment.

By setting one of these options, you're signaling to Elastic Beanstalk to use launch templates instead of launch configurations, which will resolve the errors you're seeing.

Sources
Launch Templates - AWS Elastic Beanstalk

answered 2 years ago

EXPERT

reviewed 2 years ago

0

HI ! I had the same issue and posted a detailed answer about the underlying cause for this issue and how to work around it (spoiler: above poster has it right), you can read it here:

https://repost.aws/questions/QUcX9TipxqSGeM5G7RORmqoQ/new-account-recently-created-unable-to-create-environments-on-elastic-beanstalk-launch-configuration-error#ANY34Fe2VjTd6r8Ir2-gqJRw

answered 2 years 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.