【问题标题】:Cloudformation giving error "Requires capabilities : [CAPABILITY_AUTO_EXPAND]"Cloudformation 给出错误“需要功能:[CAPABILITY_AUTO_EXPAND]”
【发布时间】:2019-06-30 12:40:32
【问题描述】:

我正在尝试为我的 .net 核心应用程序实施持续部署。当调用 lambda 函数时,我正在尝试创建一个 cloudformation 来启动资源。但出现错误:

创建 Cloud Formation 堆栈:gateway-api-uat-stack 创建堆栈失败:gateway-api-uat-stack。原因:详细消息:需要功能:[CAPABILITY_AUTO_EXPAND](服务:AmazonCloudFormation;状态代码:400;错误代码:InsufficientCapabilitiesException;请求 ID:4779587c-2a17-11e9-a093-c1704a1bf953) 状态码:400 错误代码:InsufficientCapabilitiesException

删除 Cloud Formation 堆栈:gateway-api-uat-stack Cloud Formation 堆栈:gateway-api-uat-stack 已成功删除 完成:失败

这是我的 serverless.template 文件

"AspNetCoreFunction" : {
  "Type" : "AWS::Serverless::Function",
  "Properties": {
    "Handler": "Handler-name",
    "Runtime": "dotnetcore2.0",
    "CodeUri": "",
    "MemorySize": 512,
    "Timeout": 300,
    "Role": null,
    "Policies": [ "AWSLambdaFullAccess" ],
    "Environment" : {
      "Variables" : {
      }
    },
    "Events": {
      "ProxyResource": {
        "Type": "Api",
        "Properties": {
          "Path": "/{proxy+}",
          "Method": "ANY"
        }
      },
          "RootResource": {
        "Type": "Api",
        "Properties": {
          "Path": "/",
          "Method": "ANY"
        }
      }
    }
  }

}

}

【问题讨论】:

    标签: .net jenkins aws-lambda amazon-cloudformation continuous-deployment


    【解决方案1】:

    当使用Transform: AWS::Serverless-2016-10-31、Cloudformation requiresCAPABILITY_AUTO_EXPAND。

    如果您从命令行进行部署,请将--capabilities CAPABILITY_AUTO_EXPAND 添加到您的创建/部署命令中。

    【讨论】:

    • 我正在使用 AWS Lambda 插件
    • 对不起,我不知道那是什么。
    猜你喜欢
    • 2019-07-04
    • 2020-09-28
    • 2017-05-05
    • 1970-01-01
    • 2021-06-01
    • 2022-11-03
    • 1970-01-01
    • 2014-11-17
    • 2021-12-16
    相关资源
    最近更新 更多