问题描述
我正在使用适用于C#的AWS Lambda工具包.当我直接发布AWS Lambda时,它在AWS上运行良好.但是,当我尝试通过发布来制作一个zip文件,然后在bin \ Release \ netcoreapp1.0下制作所有DLL的zip文件时.并尝试运行.
I am using AWS Lambda toolkit for C#. When I am publishing AWS Lambda directly it is working fine on AWS. But when I am trying to make a zip file by using publish and then making the zip of all DLL under bin\Release\netcoreapp1.0. and trying to run.
然后它给出了一个错误:
Then it is giving an error:
{
"errorType": "LambdaException",
"errorMessage": "An error occurred while attempting to execute your code."
}
在配置中,处理程序名称正确.
In configuration Handler name is correct.
可能是什么问题?
推荐答案
您是否尝试过使用 dotnet cli命令
压缩zip?
Have you tried packing the zip using the dotnet cli command
?
在您的项目文件夹中尝试: dotnet lambda软件包-o.\ lambda.zip
Try this in your project folder: dotnet lambda package -o .\lambda.zip
它应该创建一个 lambda.zip
文件,您可以尝试上传该文件.
It should create a lambda.zip
file which you can try to upload.
这篇关于Lambda尝试执行代码时发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!