【发布时间】:2018-04-17 12:22:02
【问题描述】:
我正在使用 Visual Studio 2017 的 Aws 工具包中包含的模板来创建一个无服务器的 asp.net core 2 Web api 服务,该服务代理一个 S3 存储桶,托管在 aws lambda 函数中。我可以使用 dotnet cli 部署它
dotnet lambda deploy-serverless
子命令的所有参数都存储在 aws-lambda-tools-defaults.json 文件。除了为 CloudFormation 模板设置的参数外,一切都按预期进行
{
"Information" : [
"This file provides default values for the deployment wizard inside Visual Studio and the AWS Lambda commands added to the .NET Core CLI.",
"To learn more about the Lambda commands with the .NET Core CLI execute the following command at the command line in the project root directory.",
"dotnet lambda help",
"All the command line options for the Lambda command can be specified in this file."
],
"profile" : "Development",
"region" : "ap-southeast-2",
"configuration" : "Release",
"framework" : "netcoreapp2.0",
"s3-prefix" : "s3-prefix/",
"s3-bucket" : "s3-bucket-name",
"stack-name" : "stack-name",
"template" : "serverless.template",
"template-parameters" : "\"ShouldCreateBucket\"=\"true\";\"BucketName\"=\"app-bucket-name\"",
"stack-wait" : true
}
在创建堆栈之前,这些参数不会传递到模板中。任何人都可以阐明这一点吗?我是否遗漏了什么,还是 Visual Studio 的 aws 工具的错误?
感谢您的宝贵时间!
【问题讨论】:
标签: amazon-web-services aws-lambda serverless