模板格式错误:AWS CloudFormation中看到不受支持的结构 [英] Template format error: unsupported structure seen in AWS CloudFormation

查看:86
本文介绍了模板格式错误:AWS CloudFormation中看到不受支持的结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下命令来验证AWS示例CloudFormation模板:

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. 

我在许多模板(包括AWS文档中的示例模板)上对此进行了尝试。所以我知道模板是可以的。

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

我在做什么错了?

推荐答案

显然,由于CLI命令格式不正确,导致非常无用的错误消息。

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

-template-body 参数必须指定为文件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.

这篇关于模板格式错误:AWS CloudFormation中看到不受支持的结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆