Skip to content

Error Creating Bastion Stack when Deploying to New AWS Account

0

Hi Team,

I have been running into an error when deploying a CloudFormation stack to a new AWS account we're adding to our pipeline. The error seems to be related to using launch configurations in our Bastion Stack.

Error message: This AWS::AutoScaling::LaunchConfiguration resource is in a CREATE_FAILED state.

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.

Any knowledge on how to resolve these deployment failures would be greatly appreciated!

asked a year ago144 views

1 Answer
0

The error you're encountering is due to AWS phasing out launch configurations in favor of launch templates. Starting October 1, 2024, Amazon EC2 Auto Scaling no longer supports the creation of launch configurations for new AWS accounts.

To resolve this issue, you'll need to update your CloudFormation template to use launch templates instead of launch configurations for your Auto Scaling groups. Here are the steps to fix this:

  1. Modify your CloudFormation template to replace the AWS::AutoScaling::LaunchConfiguration resource with an AWS::EC2::LaunchTemplate resource.

  2. Update your Auto Scaling group configuration to reference the launch template instead of the launch configuration.

  3. When configuring your launch template, ensure you're setting appropriate parameters such as:

  • Instance type
  • AMI ID
  • Security groups
  • Key pair
  • Block device mappings

If you're using Elastic Beanstalk (which might be using CloudFormation under the hood), you can trigger the use of launch templates by setting at least one of these options:

  • DisableIMDSv1
  • RootVolumeType (setting this to "gp3" has worked for many users)
  • BlockDeviceMappings
  • EnableSpot

This change is part of AWS's effort to transition customers to launch templates, which offer more features and flexibility compared to the older launch configurations.
Sources
aws-cli: eb init & eb create --elb-type application stopped working after I created new AWS account | AWS re:Post
Creating an Elastic Beanstalk without success | AWS re:Post

answered a year ago

EXPERT

reviewed 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.