I wrote a lambda function to take over some of the multithreaded code in our web app. Now, I'm looking to manually invoke the lambda function from an ASP.NET controller and then pass the function's return value back to the end-user.
I thought about using AWS SQS to invoke the function but I haven't the slightest idea how to grab the return function's return value (the value passed back with context.succeed(returnData);
). Any ideas?
AWS Lambda now supports synchronous ("RequestResponse") invocations. For .NET, the relevant documentation is here. This will return a
InvokeResponse
whosePayload
property is what is returned by the function -- that is, passed tocontext.succeed()
.