AWS CloudForformationValidation-模板持续出现错误(模板格式错误) [英] Aws cloudformation validate-template keeps giving error (Template format error)

查看:12
本文介绍了AWS CloudForformationValidation-模板持续出现错误(模板格式错误)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从昨天开始就被困在这件事上了, 我运行以下命令:

aws cloudformation validate-template --template-body test.json

(test.json是我的模板) 并且它一直给我以下错误:

A client error (ValidationError) occurred when calling the ValidateTemplate operation: Template format error: JSON not well-formed. (line 1, column 5).
我甚至尝试使用不同的AWS模板示例进行测试,但仍然出现相同的错误(使用不同的列号)。 有解决方案吗?

推荐答案

您发布的模板有效,但命令中存在语法错误,并且它无法传达问题所在。试试这个:

aws cloudformation validate-template --template-body file://template.json

这篇关于AWS CloudForformationValidation-模板持续出现错误(模板格式错误)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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