AWS Lambda Deployment Package in C#
A .NET Core Lambda deployment package is a zip file of your function's compiled assembly
along with all of its
assembly dependencies. The package also contains a file. This
signals to the .NET Core runtime all of your function's dependencies and a
proj.deps.json file, which is used to configure the .NET Core
runtime. The .NET CLI’s proj.runtimeconfig.jsonpublish command can create a folder with all of these files, but by default the
will not be included because a Lambda project is
typically configured to be a class library. To force the
proj.runtimeconfig.json to be written as part of the proj.runtimeconfig.jsonpublish
process, pass in the command line argument: /p:GenerateRuntimeConfigurationFiles=true to the publish
command.
Although it is possible to create the deployment package with the dotnet publish command, we
suggest you create the deployment package with either the AWS Toolkit for Visual Studio or the .NET Core CLI.
These are tools optimized specifically for Lambda to ensure the
file exists and optimizes the package
bundle, including the removal of any non-Linux-based dependencies.
lambda-project.runtimeconfig.json
