Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon cloudformation cloudformation模板-验证错误_Amazon Cloudformation_Amazon Sns - Fatal编程技术网

Amazon cloudformation cloudformation模板-验证错误

Amazon cloudformation cloudformation模板-验证错误,amazon-cloudformation,amazon-sns,Amazon Cloudformation,Amazon Sns,我需要使用云形成模板将sns主题指定为目标 JobFailedAlert是sns主题的名称 我有这个模板rule.json,我得到了错误 错误: Template validation error: Template error: instance of Fn::GetAtt references undefined resource SNSTopic 模板: { "Resources": { "Rule": { "Type" : "AWS::Events::Rule",

我需要使用云形成模板将sns主题指定为目标

JobFailedAlert是sns主题的名称

我有这个模板rule.json,我得到了错误

错误:

Template validation error: Template error: instance of Fn::GetAtt references undefined resource SNSTopic
模板:

    {
"Resources": {
  "Rule": {
  "Type" : "AWS::Events::Rule",
  "Properties" : {
    "Description" : "create a sns alert when a batch job changes state to failed",
    "EventPattern" : {
  "detail-type": [
    "Batch Job State Change"
  ],
  "source": [
    "aws.batch"
  ],
  "detail": {
    "jobQueue": [
      "arn:aws:batch:us-east-1:************:job-queue/testbatchjobqueue"
    ],
    "status": [
      "FAILED"
    ]
  }
},
    "Name" : "alertonfailedbatchjobs2",
    "State" : "Enabled",
    "Targets": [
  {
    "Arn": { "Ref": "SNS Topic" },
    "Id": "JobFailedAlert"
  }
  }
}
}
}

可能规则是在SNS主题之前创建的。尝试确保首先使用DependsOn创建SNS主题,例如:

"Rule": {
    DependsOn: TheSNSTopic
    ...
}

请显示模板中定义SNS主题的部分。