aws / aws-extensions-for-dotnet-cli

Extensions to the dotnet CLI to simplify the process of building and publishing .NET Core applications to AWS services
Apache License 2.0
369 stars 86 forks source link

`deploy-function` doesn't recognize dotnet6 as runtime when passed as parameter #245

Closed Kralizek closed 1 year ago

Kralizek commented 1 year ago

Describe the bug

If I execute the following command

$ dotnet lambda deploy-function --runtime dotnet6

I'm prompted again for the runtime.

Expected Behavior

Arguments passed via command line should be accepted and I should not get prompted to insert the value again

Current Behavior

I'm asked again for the runtime.

Reproduction Steps

  1. Create a function
  2. Try to deploy using the command shown above
  3. You will be prompted again for the runtime
dotnet lambda deploy-function --profile IA --function-name FindNationality --framework net6.0 --runtime dotnet6
Amazon Lambda Tools for .NET Core applications (5.5.0)
Project Home: https://github.com/aws/aws-extensions-for-dotnet-cli, https://github.com/aws/aws-lambda-dotnet

Enter Runtime: (The runtime environment for the Lambda function)
dotnet6

Possible Solution

No response

Additional Information/Context

No response

Targeted .NET platform

.NET SDK 6.0.400

CLI extension version

Package Id               Version                   Commands
----------------------------------------------------------------
amazon.lambda.tools      5.5.0                     dotnet-lambda
cake.tool                2.3.0                     dotnet-cake
dotnet-file              1.3.1                     dotnet-file
dotnet-serve             1.10.112                  dotnet-serve
microsoft.tye            0.11.0-alpha.22111.1      tye

Environment details (OS name and version, etc.)

Windows 11 Pro

ashishdhingra commented 1 year ago

Hi @Kralizek,

Good morning.

The parameter name to specify runtime is --function-runtime. You could get the list of supported options by executing dotnet lambda deploy-function --help which would display command line help.

Thanks, Ashish