- Newest
- Most votes
- Most comments
The error you're encountering is 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. In accounts and regions where Elastic Beanstalk environments don't already exist, creating new launch configurations is no longer possible.
To resolve this issue and successfully create your Elastic Beanstalk environment, you need to signal to Elastic Beanstalk to use launch templates instead of launch configurations. You can do this by setting at least one of the following options in your environment configuration:
- DisableIMDSv1
- RootVolumeType
- BlockDeviceMappings
- EnableSpot
The easiest way to implement this is by setting the RootVolumeType option. You can do this through the Elastic Beanstalk console, AWS CLI, or API calls when creating your environment.
If you're using the Elastic Beanstalk console, look for these options under the "Capacity" configuration section when creating or updating your environment.
If you're using the AWS CLI, you can add an option setting like this:
--option-settings Namespace=aws:autoscaling:launchconfiguration,OptionName=RootVolumeType,Value=gp2
Alternatively, you could try enabling Spot instances by setting the EnableSpot option, which will also cause Elastic Beanstalk to use launch templates.
It's important to note that if your environment uses functionality requiring Amazon EC2 launch templates, your user policy must have the required permissions. If it doesn't, creating or updating the environment might fail. To ensure you have the necessary permissions, you can use the AdministratorAccess-AWSElasticBeanstalk managed user policy or add the required permissions to your custom policy.
By implementing one of these options, you should be able to successfully create your Elastic Beanstalk environment using launch templates instead of launch configurations.
Sources
Creating an Elastic Beanstalk without success | AWS re:Post
Auto Scaling group configuration for your Elastic Beanstalk environment - AWS Elastic Beanstalk
Modifying the resources that Elastic Beanstalk creates for your environment - AWS Elastic Beanstalk
answered 2 years ago
Relevant content
asked 3 years ago
