Should you run ASP.NET Core 2.2 Serverless in AWS?

AWS will only support LTS releases of NET Core. Version 2.2 will never be an LTS release. The next version is 3.1 as per the .NET Core Roadmap.

Although you *could* leverage Amazon.Lambda.RuntimeSupport, I would advise against it. In my experience I’ve found both the deployment and the startup times to be lengthier.

When rolling with custom runtime, you are responsible for ensuring you are running on the latest set of patches. Running in such environment may open up a discussion with your InfoSec team. They may ask why you deviated from the AWS standard offering (which includes patching, etc) and what exactly is the custom environment comprised off. If you have a good reason (ie a new feature you absolutely need) then the decision is justified. Otherwise, I would steer clear of unnecessary customizations which incur engineering and operationalization costs.

I found these benchmarks by Zac Charles comparing custom and standard .NET lambda environments. Both the cold, warm, and deployment times are longer for custom environments.

If you are still not convinced and would like to custom roll your environment, I suggest reading Announcing Amazon.Lambda.RuntimeSupport from AWS blog and then looking at CustomRuntimeAspNetCore code sample.