为不需要模板的模板指定的AWS CloudFormation参数值

时间:2020-01-24 07:29:46

标签: amazon-cloudformation

我将代码从ruby移植到Python,用于CloudFormation堆栈创建项目。下面是一个堆栈,我一直在获取“为不需要它们的模板指定的参数值。”

这真的什么也没告诉我。

我已经根据模式检查了json,一切都很好,并对照了原始代码创建的堆栈并进行了匹配,因此有人可以在这里看到问题,或者至少将我指向正确的方向。

{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "EcsStack-5ad0c44afbf508d0b5a158df0da307fca33f5f63",
    "Outputs": {
        "marc1EcsCluster": {
            "Value": {
                "Ref": "marc1EcsCluster"
            }
        },
        "marc1EcsClusterArn": {
            "Value": {
                "Fn::GetAtt": [
                    "marc1EcsCluster",
                    "Arn"
                ]
            }
        }
    },
    "Parameter": {
        "Vpc": {
            "Description": "VPC ID",
            "Type": "String"
        }
    },
    "Resources": {
        "CloudFormationDummyResource": {
            "Metadata": {
                "Comment": "Resource to update stack even if there are no changes",
                "GitCommitHash": "5ad0c44afbf508d0b5a158df0da307fca33f5f63"
            },
            "Type": "AWS::CloudFormation::WaitConditionHandle"
        },
        "marc1EcsCluster": {
            "Type": "AWS::ECS::Cluster"
        }
    },
    "Transform": "AWS::Serverless-2016-10-31"
}

1 个答案:

答案 0 :(得分:1)

作为更一般的建议,CloudFormation Linter将通过以下消息捕获这些错误:

E1001: Top level item Parameter isn't valid template.json:19