10
votes

Is it possible to statically specify AWS::StackName inside a cloudformation template? Or can this only be specified as a parameter when you run the template?

As far as I understand, this value can only be read via pseudo parameters, not set:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-stackname

1
You question also answered my question: AWS: How does CloudFormation know a template has been deployed? stackoverflow.com/questions/59645741/…Ryan Lyu

1 Answers

10
votes

No, you can't.

Template is just a content of your stack, it doesn't set it's metainfo (like name, deployment region etc.).

Note, that you can use same template for multiple stacks, or even sub-stacks.