Template format error: unsupported structure seen

2019-07-07 07:22发布

I am trying to validate an AWS example CloudFormation template using a command like:

▶ aws cloudformation validate-template --template-body template.yml

This leads to the following error message:

An error occurred (ValidationError) when calling the ValidateTemplate operation:
  Template format error: unsupported structure. 

I tried this on many templates, including example templates from the AWS documentation. So I know the templates are okay.

What am I doing wrong?

1条回答
何必那么认真
2楼-- · 2019-07-07 08:00

Apparently, the very unhelpful error message comes as a result of improper formatting in the CLI command.

The --template-body argument must be specified as a file URI.

Thus, the correct, runnable form of the command above is:

▶ aws cloudformation validate-template --template-body file://template.yml

See this blog post for more information.

查看更多
登录 后发表回答