gpt4 book ai didi

aws-cloudformation - AWS 云形成 : Template format error: At least one Resources member must be defined

转载 作者:行者123 更新时间:2023-12-04 14:51:02 24 4
gpt4 key购买 nike

我确信这个模板以前可以工作,但是当我在设计器中验证时,它会显示:

12/5/2018, 9:41:47 AM - Template contains errors.: Template format error: At least one Resources member must be defined.

我不明白为什么。我只有一种资源,它的定义是什么?

{
"AWSTemplateFormatVersion": "2010-09-09",
"Metadata": {
"AWS::CloudFormation::Designer": {
"7edb75f7-c18f-41d8-972e-959e2326ffda": {
"size": {
"width": 60,
"height": 60
},
"position": {
"x": 255,
"y": 217
},
"z": 0,
"embeds": []
}
}
},
"Resources": {
"DemoEc2Stack": {
"Type": "AWS::EC2::Instance",
"Properties": {
"KeyName": "InSiteAutoScaleKey",
"DisableApiTermination": false,
"ImageId": "ami-redacted",
"InstanceType": "t2.micro",
"Monitoring": false,
"SecurityGroupIds": [
"sg-redacted"
],
"Tags": [
{
"Key": "Name",
"Value": "api-demo-cloudformed"
}
]
},
"Metadata": {
"AWS::CloudFormation::Designer": {
"id": "7edb75f7-c18f-41d8-972e-959e2326ffda"
}
}
}
}
}

最佳答案

问题已解决。真是个蠢货!当我从 VS Code 粘贴 CF 模板时,我位于“资源”选项卡上。我需要进入 AWS 控制台中堆栈设计器的"template"选项卡。啊。我想跳下悬崖O.O

关于aws-cloudformation - AWS 云形成 : Template format error: At least one Resources member must be defined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53622618/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com