Skip to content
Discussion options

You must be logged in to vote

--cli-input-yaml reads an API request structure from your YAML file, but it does not reliably expand file://... references inside that YAML into the file contents for TemplateBody.

So CloudFormation ends up receiving TemplateBody as the literal string file://git-sync/prerequisites.yaml (not the template), and then fails template parsing with:

Template format error: unsupported structure.

The two correct ways to make this work are:

Use --cli-input-yaml for everything EXCEPT the template body, and pass the template on the command line (CLI args override the input file):

aws cloudformation create-stack
--cli-input-yaml file://git-sync-prerequisites-stack.yaml
--template-body file://git-syn…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@uldyssian-sh
Comment options

Answer selected by gautaz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants