- Newest
- Most votes
- Most comments
The issue you're experiencing is related to AWS phasing out launch configurations in favor of launch templates. Starting October 1, 2024, new AWS accounts and existing accounts in regions where they don't already have an environment will only be able to create Elastic Beanstalk environments using launch templates.
To resolve this issue and successfully create your Elastic Beanstalk environment, you need to explicitly configure your environment to use launch templates instead of launch configurations. Here are the steps to address your questions:
-
To use launch templates with Elastic Beanstalk, you need to 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
-
Yes, specific option settings are required when using launch templates. Here's an example of how you can modify your CLI command to include the necessary options:
aws elasticbeanstalk create-environment \ --application-name weshop-application \ --environment-name weshop-prod \ --solution-stack-name "64bit Amazon Linux 2 v3.7.10 running Corretto 17" \ --option-settings \ "Namespace=aws:autoscaling:launchconfiguration,OptionName=RootVolumeType,Value=gp3" \ "Namespace=aws:ec2:instances,OptionName=DisableIMDSv1,Value=true" \ ... (your other option settings)Adding one of these options will signal Elastic Beanstalk to use launch templates instead of launch configurations.
-
While there isn't specific documentation solely addressing launch template configuration for Elastic Beanstalk, AWS has provided information about this transition in their documentation. You can find details about the transition to launch templates, including the required options and permissions, in the Elastic Beanstalk documentation.
Additionally, ensure that your IAM user or role has the necessary permissions for working with launch templates. These permissions include:
- ec2:RunInstances
- ec2:CreateLaunchTemplate
- ec2:CreateLaunchTemplateVersions
- ec2:DeleteLaunchTemplate
- ec2:DeleteLaunchTemplateVersions
- ec2:DescribeLaunchTemplate
- ec2:DescribeLaunchTemplateVersions
If you're using a custom IAM policy, make sure to add these permissions. Alternatively, you can use the AdministratorAccess-AWSElasticBeanstalk managed user policy, which includes the necessary permissions.
By implementing these changes, you should be able to successfully create your Elastic Beanstalk environment using launch templates.
Sources
Launch Templates - AWS Elastic Beanstalk
Modifying the resources that Elastic Beanstalk creates for your environment - AWS Elastic Beanstalk
Creating Elastic Beanstalk environments with the AWS CLI - AWS Elastic Beanstalk
Launch configurations have/are beeing deprecated
Please use launch templates instead
Thank you for your answer. I am using https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing.ec2.console.html tutorial, but there's no similarity between the images and description provided vs what I see on my AWS console.
Also, when I try to create a new environment, I do not have an option as mentioned here to specify a launch template during the environment creation. Please see attached.
AWS Support need your attention as many of your tutorials seem to be falling apart from the changes you are rolling out!
Hello.
Why not try running it from the EB CLI instead of the AWS CLI?
When executing, please try using ".ebextensions" as described in the article below.
https://repost.aws/articles/ARlR3V5zdsTTWrHs2mh2oThw/how-to-use-launch-templates-with-elasticbeanstalk-s-autoscaling
Relevant content
- AWS OFFICIALUpdated 2 months ago

The CLI command is itself incorrect. It does not specify the Launch Template but Launch Config, I think. I used very similar commands from AI but did not work.