Launch templates for your Elastic Beanstalk environment
This topic explains that AWS is phasing out launch configurations and replacing them with launch templates. It also explains how Elastic Beanstalk environments are affected. If you'd like to migrate an older environment, that was created prior to October 1, 2024, from launch configurations to launch templates follow the instructions in this topic.
As of October 1, 2024, Amazon EC2 Auto Scaling no longer supports the creation of launch configurations for new accounts. This change is due to launch configurations being phased out and replaced by launch templates by the Amazon EC2 Auto Scaling service. For more information, see Auto Scaling launch configurations in the Amazon EC2 Auto Scaling User Guide.
The transition to launch templates affects Elastic Beanstalk accounts and environments as follows:
-
Existing environments – Existing environments that were created prior to October 1, 2024 are not impacted by the launch configuration deprecation. However, if you'd like to migrate your existing environment to launch templates, use the configuration option settings listed in Option settings for launch templates.
-
New accounts – New Accounts will automatically use launch templates by default, since launch configurations are deprecated.
-
Existing accounts – Existing accounts are not impacted by the launch configuration deprecation. However, if you'd like to migrate any of your existing environments with launch configurations to launch templates, use the configuration option settings listed in Option settings for launch templates.
Option settings for launch templates
Select at least one of the option settings in the following list to direct Elastic Beanstalk to create an environment with a launch template. If you already have existing environments based on launch configurations, select at least one of these options to move an already existing environment from a launch configuration to a launch template.
-
RootVolumeType
option set to gp3. You can set this option with the console or the namespace . -
BlockDeviceMappings
option contains gp3. You can set this option with the console or the namespace. -
DisableIMDSv1
option set to true. We recommend that you set this option using the namespace. -
EnableSpot
option set to true. For more information, see Spot Instance support for your Elastic Beanstalk environment and Enabling Spot Instances.
Important
Once an environment is using launch templates, Elastic Beanstalk will never move it back to launch configurations. This is the case even if any these option settings that prompted the original use of launch templates are removed.
Confirm whether your environment has launch configurations or launch templates
You can confirm if your environment already uses launch templates, or if it's using launch configurations, by inspecting the CloudFormation stack template.
To inspect your environment's CloudFormation stack template
-
Open the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation
. -
On the navigation bar at the top of the screen, choose the AWS Region where you created the environment.
-
On the Stacks page of the CloudFormation console, inspect the Description column.
Locate and select the stack for the Elastic Beanstalk environment. CloudFormation displays the stack details for the environment.
-
In Stack details select the Template tab.
Using your browser's page search, you can search the template text for launchtemplate or launchconfiguration.
For more information, see View stack information in the AWS CloudFormation User Guide.
Required permissions for launch templates
If you use our Elastic Beanstalk managed service role policies, your environment has the required permissions to create launch templates via the managed policy AWSElasticBeanstalkManagedUpdatesCustomerRolePolicy.
If you have any custom policies attached to an Elastic Beanstalk service role, you must ensure that the following permissions are available. Doing so provides Elastic Beanstalk permission to create launch templates in your account.
Required permissions for Amazon EC2 launch templates
-
ec2:RunInstances
-
ec2:CreateLaunchTemplate
-
ec2:CreateLaunchTemplateVersions
-
ec2:DeleteLaunchTemplate
-
ec2:DeleteLaunchTemplateVersions
-
ec2:DescribeLaunchTemplate
-
ec2:DescribeLaunchTemplateVersions
The following example IAM policy includes these permissions.
{ "Statement": [ { "Effect": "Allow", "Action": [ "ec2:RunInstances", "ec2:CreateLaunchTemplate", "ec2:CreateLaunchTemplateVersions", "ec2:DeleteLaunchTemplate", "ec2:DeleteLaunchTemplateVersions", "ec2:DescribeLaunchTemplate", "ec2:DescribeLaunchTemplateVersions" ], "Resource": [ "*" ] } ] }
For more information, see Managing Elastic Beanstalk service roles and Managing Elastic Beanstalk user policies.
More about launch templates
To learn more about launch templates, see Auto Scaling launch templates in the Amazon EC2 Auto Scaling User Guide.
To learn more about the AWS transition from launch configurations to launch templates, along with the benefits that launch templates offer, see
Amazon EC2 Auto Scaling will no
longer add support for new EC2 features to Launch Configurations
Important
You don't need to follow the procedure that's referenced in this blog article to transition an older environment to launch templates . To migrate an existing Elastic Beanstalk environment to launch templates, you only need to set one of the options listed in Option settings for launch templates.