AWS Cloudformation:无效的模板资源属性错误

我正在尝试创build一个Cloudformation模板来configuration一个IAMangular色。

据我可以告诉我的JSON是100%有效,但显然我忽略了其他的东西,因为它无法validation:

调用ValidateTemplate操作时发生客户端错误(ValidationError):无效的模板资源属性“BambooInstanceProfile”

我的代码:

{ "Description" : "Bamboo IAM role", "Parameters" : { }, "Resources" : { "BambooAgentRole" : { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { "Version" : "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": [ "ec2.amazonaws.com" ] }, "Action": [ "sts:AssumeRole" ] } ] }, "Path": "/devtools/bamboo/", "Policies": [ { "PolicyName": "ec2_bamboo", "PolicyDocument": { "Version" : "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:DescribeTags", "ec2:DescribeInstances" ], "Resource": "*" } ] } } ] }, "BambooInstanceProfile": { "Type": "AWS::IAM::InstanceProfile", "Properties": { "Path": "/devtools/bamboo/", "Roles": [ { "Ref": "BambooAgentRole" } ] } } } }, "Outputs" : { "IAM" : { "Value" : { "Ref" : "BambooInstanceProfile" }} } } 

我在这里俯瞰什么?

您已将“BambooInstanceProfile”设置为“BambooAgentRole”的属性,而不是自己的资源。 还有一个}需要在你的“BambooInstanceProfile”之前来。