I'm trying to use the Amazon Elastic Beanstalk Tools for .NET Core applications (4.2.2) to publish a net6.0 app to AWS EB (windows). At the time of writing I need to include the net6.0 runtime since net6.0 is not supported on EB yet. I can successfully publish my app to AWS using the AWS Toolkit for Visual Studio. The toolkit calls dotnet publish with the following parameters:
Executing: dotnet publish "[my project path]" --output "[my project path]\bin\Release\net6.0\publish" --configuration "Release" --framework "net6.0" --runtime win-x64 --self-contained true
The toolkit creates this config file (aws-beanstalk-tools-defaults.json) following a successful publish:
{
"additional-options" : "",
"application" : "myApp",
"app-path" : "/",
"configuration" : "Release",
"enable-xray" : false,
"enhanced-health-type" : "enhanced",
"environment" : "myApp-test",
"framework" : "net6.0",
"iis-website" : "Default Web Site",
"region" : "eu-west-1",
"self-contained" : true,
"runtime" : "win-x64"
}
However when I try to use the command line utility with the command:
dotnet eb deploy-environment -cfg myConfFile.json
the self-contained and runtime parameters are not passed to the dotnet deploy call resulting in this call:
dotnet publish "my project path]" --output "my project path]\bin\Release\net6.0\publish" --configuration "Release" --framework "net6.0"
I have tried passing the parameters without using the config file as
dotnet eb deploy-environment --profile XXX -c Release -env myApp-test -po --runtime "win-x64"
only to get trigger this exception:
System.InvalidOperationException: Required argument missing for option: --runtime
Is there anyway to use this utility to publish a net6.0 app using self-contained bundled to a windows based EB instance ?