问题
The following image is my question. SO would not allow me to post because of some error about formatting code incorrectly that I couldn't figure out how to resolve after an hour of trying.
Image of my question
回答1:
I've been bitten by this too. It boils down to limitations on CloudFormation's intrinsic functions (source):
Note
You can use intrinsic functions only in specific parts of a template. Currently, you can use intrinsic functions in resource properties, metadata attributes, and update policy attributes.
In this case, "resource properties" only applies to the contents of the Properties field. I would expect this to change, since I suspect Amazon has gotten many complaints about this! I'll happily update the answer when that happens.
回答2:
The Description must be a literal string value. Even if it is an expression that returns a string, such as the one you have, it is invalid. Here is a related question.
来源:https://stackoverflow.com/questions/39678784/validationerror-when-calling-the-createstack-operation-template-format-error