问题描述
我正在尝试使用 net core 3.1 lambda 和 AWS SAM 发送一个简单的 hello world,所以这是我的 template.yml:
AWstemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Net Core 3.1 Lambda
Resources:
netcore31lambdafunc:
Type: AWS::Serveless::Function
Properties:
FunctionName: Netcore31Test
CodeUri: src/LambdaEmptyServerless/bin/Release/netcoreapp3.1/publish
Handler: LambdaEmptyServerless::LambdaEmptyServerless.Functions::Get
Runtime: dotnetcore3.1
Events:
netcore31ApiEvent:
Type: Api
Properties:
Path: /
Method: GET
位于这一层:
现在我正在尝试将其打包到 S3 存储桶中,因此我正在执行以下操作:
sam package --template-file template.yml --output-template-file out-template.yml --s3-bucket demo-sam-001
我得到了以下回报:
Successfully packaged artifacts and wrote output template to file out-template.yml.
Execute the following command to deploy the packaged template
sam deploy --template-file C:\Users\rlanh\Workspace\Pessoal\awssam-netcore31\LambdaEmptyServerless\out-template.yml --stack-name <YOUR STACK NAME>
但没有上传到我的 S3 存储桶。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)