I have followed this guide to deploy a .NET Core 3.0 application to AWS Lambda:
https://aws.amazon.com/blogs/developer/net-core-3-0-on-lambda-with-aws-lambdas-custom-runtime/
My serverless.template and aws-lambda-tools-defaults.json files are carbon copies from this article.
My app is an ASP.NET Core app with a target framework of netcoreapp3.0 using the Amazon.Lambda.AspNetCoreServer and Amazon.Lambda.RuntimeSupport packages.
When I run dotnet lambda deploy-serverless I get the error:
NETSDK1031: It is not supported to build or publish a self-contained application without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set SelfContained to false.
Every example I have seen shows this for the msbuild-parameters:
"msbuild-parameters": "--self-contained true /p:AssemblyName=bootstrap"
But obviously, I can try the dotnet publish --self-contained true command from the command line and I get the same error (NETSDK1031). How is this supposed to work?
If I change the command and run dotnet publish --self-contained true -f netcoreapp3.0 -r linux-x64 it publishes successfully on my local.
If I update the msbulid-parameters with the same required parameters and run dotnet lambda deploy-serverless I get:
... publish: MSBUILD : error MSB1009: Project file does not exist.
What am I missing?
