0
votes

Good day, I have an AWS CloudFormation template where I create some LaunchConfigurations that have the same UserData. This UserData is created from the parameters passed to the new Stack. My question is if is there a way to create a function or variable that has that UserData string created just once and pass it to all LaunchConfigurations?

I read this: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-fuctions-structure.html

But I don't know where I can declare them.

1

1 Answers

0
votes

There is no way to create own functions as well variables. But you can create custom resource (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref.html) that will implement logic of the user data generation.