2
votes

How do we create Launch configurations in cloudformation with specific name.? I looked at the docs https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html, there is no property that sets the name of the launch configuration that we create in template. Is there any way?

1

1 Answers

2
votes

You should not try to name the LaunchConfiguration yourself, as cloudformation need to setup its own name to be able to update it later.

Usually, the LauchConfiguration will be named according to the stack and resource name from the template, something like: {stack-name}-{resource-name}-{AWS-generated-id}, this gived me for example: amp-g2g-preprod-api-ec2-ApiLaunchConfiguration-1PQ85HXBX7DVC.

If you need to reference anywhere else your LaunchConfiguration, use {"Ref":"..."} from within the template, or use output export/import from another template.