Since Amazon now supports C # for building AWMS Lambda functions, I wanted to try, but I was stuck when running the test.
This is my simple class:
using System; using System.IO; using System.Text; using Amazon.Lambda.Core;
I compiled it using .Net Core. The result is a netstandard1.4 folder with the MyTest.dll build file and the MyTest.deps.json file. These compressed as .zip are downloaded to the AWS Lambda console.
On the configuration tab, the handler is defined as:
MyTest::LambdaFunction::Handler
But when I press the TEST button, this returns an error message:
{ "errorType": "LambdaException", "errorMessage": "Unable to load type 'LambdaFunction' from assembly 'MyTest, Culture=neutral, PublicKeyToken=null'." }
Note1: before I found out that I needed to use .Net Core instead of the full CLR, I received an error message that the assembly could not be loaded, so I decided that the assembly was now compiled.
Note2: I tried several types of arguments (Stream and String are the only ones supported without a special serializer, though) for the Handler method, as well as the static / instance class or method or any combination, all to no avail.
Anyone who has already got this job and can give me some pointers?
Kevin source share