Should I use "--self-contained true" when publishing a .NET Core 3.1 Lambda to AWS?

Viewed 376

Simple question as the title implies... I know with a .NET 5.0 package, I would have to provide it as a custom runtime and package it as self contained. But with .NET Core 3.1 which is natively supported by AWS, are there any pros/cons to using the flag "--self-contained true"?

1 Answers

As far as I'm aware, cold starts can be affected by larger package bundles (such as the ones that include the runtime). Have a look at Cold starts with .NET Core 3.0 in this article.

So I wouldn't make it self contained unless you have a good reason to do it (i.e., having to use .NET 5).

Related