没有状态原因的ApiGateway :: Method的Cloudformation堆栈CREATE_FAILED

时间:2016-10-18 03:08:02

标签: aws-lambda amazon-cloudformation aws-api-gateway

enter image description here

如果删除RestAPI +相关资源,则堆栈成功。我不确定如何获取错误消息,以了解为什么它失败了这个配置。

这里是失败资源的JSON:

{
   "RestAPI":{
      "Type":"AWS::ApiGateway::RestApi",
      "Properties":{
         "Name":"FD-API"
      }
   },
   "RestAPIResourceFDImage":{
      "Type":"AWS::ApiGateway::Resource",
      "Properties":{
         "RestApiId":{
            "Ref":"RestAPI"
         },
         "ParentId":{
            "Fn::GetAtt":[
               "RestAPI",
               "RootResourceId"
            ]
         },
         "PathPart":"{image}"
      },
     "DependsOn": ["RestAPI"]
   },
   "RestAPIMethodGetProperties":{
      "Type":"AWS::ApiGateway::Method",
      "Properties":{
         "AuthorizationType":"NONE",
         "ResourceId":{
            "Ref":"RestAPIResourceFDImage"
         },
         "HttpMethod":"GET",
         "Integration":{
            "Type":"AWS",
            "Credentials": {
                "Fn::GetAtt": [
                    "RoleFDApiGateway",
                    "Arn"
                ]
            },
            "IntegrationHttpMethod":"POST",
            "PassthroughBehavior": "NEVER",
            "Uri":{
               "Fn::Join":[
                  "",
                  [
                     "arn:aws:apigateway:",
                     {
                        "Ref":"AWS::Region"
                     },
                     ":lambda:path/2015-03-31/functions/",
                     {
                        "Fn::GetAtt":[
                           "FunctionFDLambda",
                           "Arn"
                        ]
                     },
                     "/invocations"
                  ]
               ]
            },
            "RequestTemplates": {
                "application/json": {
                    "Fn::Join": [
                        "",
                        [
                            "{ \"key\": \"$input.params('image')\", \"bucket\": \"",
                            {
                                "Ref": "FDBucket"
                            },
                            "\" }"
                        ]
                    ]
                }
            }
         }
        },
        "DependsOn": ["RestAPIResourceFDImage"]
   },
   "ReatAPIDeploymentFD": {
        "Type": "AWS::ApiGateway::Deployment",
        "Properties": {
            "RestApiId": {"Ref": "RestAPI"},
            "StageName": "v1"
        },
        "DependsOn": ["RestAPIMethodGetProperties"]
    }
}

0 个答案:

没有答案