Lambda fuction uploading error
victorarshon opened this issue · 3 comments
Hello,
I received "Error uploading function" message when I tried to upload my function to AWS Lambda.
The reason of the error is that the framework netcoreapp2.1 is a newer version than Lambda runtime dotnetcore2.0 supports. Please see the picture attached.
I was not able to select the framework version older than netcoreapp2.1 using Upload to AWS Lambda wizard. Please also see the picture attached.
What should I do in order to apply Lambda function implemented in C# language?
do you see a json file called aws-lambda-tools-defaults.json? If so, you can change the runtime and framework there to look like this:
"framework" : "netcoreapp2.1", "function-runtime":"dotnetcore2.1",
if that doesn't work, try creating a new temporary project from our lambda blueprints and compare project settings by comparing the .csproj files and the same json file you edited above.
Hello,
Thank you for your recommendation. I edited the mentioned files manually.
I modified the aws-lambda-tools-defaults.json file:
"framework" : "netcoreapp2.0",
"function-runtime" : "dotnetcore2.0",
I also changed the project.csproj file:
< TargetFramework>netcoreapp2.0< /TargetFramework>
In this situation I was able to finish the uploading the function.
Regards
Victor
Closing issue as it appears it was resolved by updating the defaults and project files.