gpt4 book ai didi

.net - Cloudformation给出错误 "Requires capabilities : [CAPABILITY_AUTO_EXPAND]"

转载 作者:行者123 更新时间:2023-12-03 07:29:48 29 4
gpt4 key购买 nike

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

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

删除 Cloud Formation 堆栈:gateway-api-uat-stackCloud 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"
}
}
}
}

}

}

最佳答案

使用转换时:AWS::Serverless-2016-10-31Cloudformation requires CAPABILITY_AUTO_EXPAND

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

关于.net - Cloudformation给出错误 "Requires capabilities : [CAPABILITY_AUTO_EXPAND]",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54555691/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com