I'm new in AWS but have already tried to compose and deploy simple .NET Core 2.0 application.
I have .Net 4.6 application which uses external c++ dll. The last one hase it own huge number of dependencies - over 300 MB of other dlls. So I try to deploy those stuff on AWS using Lambda.
At first I've created simple AWS Lambda Project and tried to code logic on following method
public async Task<string> FunctionHandler(S3Event evnt, ILambdaContext context) { ... }
But during deployment I've got error - it allows to deploy just ~65MB of content with Lambda.
Later I've created AWS Serverless Application - it was much better because of possibility of WebAPI using (it would be useful to use it in future for me). I've started to create logic in public class LambdaEntryPoint : Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFunction
class, adding the handler function:
public async Task<string> FunctionHandlerAsync(JObject param, ILambdaContext context) { ... }
The first trouble was JObject - it was awful to parse it to get Bucket and Object key. And still it was the limitation of deployment content - already ~250MB. The fix was done - I've got all dependencies and .exe file into the .zip and unzipped it to the \tmp folder during the LambdaEntryPoint initialization. That was right and without issues. But later I tried to launch an .exe file using the following code:
var process = new System.Diagnostics.Process();
process.StartInfo.FileName = "Photolemur Console.exe";
process.StartInfo.WorkingDirectory = @"\tmp";
process.StartInfo.Arguments = $"\"{inboxPath}\" \"{outboxPath}\"";
process.Start();
process.WaitForExit();
And I've got FileNotFound Exception. So the question is below -
Is it possible to do such thing using AWS lambda functions? I know that I could rise EC2 with virtual Window installation. But is it right way? What do you think about AWS .NET in general? Should I continue my researching or maybe it's easier way to explore Microsoft Azure Functions?
PS: Is it some nice solutions to do such work using just my C++ libraries at AWS?