好吧,我试图验证你的JSON模式使用在线验证。
http://jsonlint.com/
我只是复制您的JSON模式,并粘贴在那里。它表示无效架构期待{在第1行。好吧,当然,我必须把开放和结束括号,并在您的架构之间。但它又给了错误。额外括号}在最后一行。所以我不得不删除它。然后json模式被验证。这意味着你的模式中的某个地方正在增加一个右括号}。
我想你在哪里犯错误的地方:
"InstanceSecurityGroup" : {
"Type" : "AWS::EC2::SecurityGroup",
"Properties" : {
"GroupDescription" : "Enable SSH access and HTTP from the load balancer only",
"SecurityGroupIngress" : [ {
"IpProtocol" : "tcp",
"FromPort" : "22",
"ToPort" : "22",
"CidrIp" : { "Ref" : "SSHLocation"}
},
{
"IpProtocol" : "tcp",
"FromPort" : { "Ref" : "WebServerPort" },
"ToPort" : { "Ref" : "WebServerPort" },
"SourceSecurityGroupOwnerId" : {"Fn::GetAtt" : ["ElasticLoadBalancer", "SourceSecurityGroup.OwnerAlias"]},
"SourceSecurityGroupName" : {"Fn::GetAtt" : ["ElasticLoadBalancer", "SourceSecurityGroup.GroupName"]}
} ]
}
}//Extra Bracket i think so
},
"Outputs" : {
"URL" : {
"Description" : "The URL of the website",
"Value" : { "Fn::Join" : [ "", [ "http://", { "Fn::GetAtt" : [ "ElasticLoadBalancer", "DNSName" ]}]]}
}
}
}
为什么会出现嵌入在URL空格的字符串?这是一个错字还是它在源代码中的URL? – 2014-09-05 20:02:47