aws / aws-lambda-dotnet

Libraries, samples and tools to help .NET Core developers develop AWS Lambda functions.
Apache License 2.0
1.57k stars 478 forks source link

`dotnet new lambda --list` does not show all Lambda templates #1396

Closed bjhogan closed 1 year ago

bjhogan commented 1 year ago

Describe the bug

Run dotnet new lambda --list

This returns a list of 23 templates.

Run dotnet new list | grep AWS

This returns a list of 28 templates.

The missing templates are -

Template Name Short Name
Serverless Detect Image Labels serverless.DetectImageLabels
Serverless project configured for deployment using .NET 7's... serverless.NativeAOT
Serverless Simple S3 Function serverless.S3
Serverless WebSocket API serverless.WebSocketAPI
Step Functions Hello World serverless.StepFunctionsHelloWorld

Expected Behavior

All Lambda templates should be shown.

Current Behavior

23 instead of 28 are shown

Reproduction Steps

Run dotnet new lambda --list

This returns a list of 23 templates.

Run dotnet new list | grep AWS

This returns a list of 28 templates.

Possible Solution

Add the word Lambda to the template name

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

Amazon.Lambda.Templates::6.9.0

Targeted .NET Platform

.NET 7

Operating System and version

Windows 10

ashishdhingra commented 1 year ago

Reproducible.

user@xxxxx folder % dotnet new --install "Amazon.Lambda.Templates"
Warning: use of 'dotnet new --install' is deprecated. Use 'dotnet new install' instead.
For more information, run: 
   dotnet new install -h

The following template packages will be installed:
   Amazon.Lambda.Templates

Amazon.Lambda.Templates (version 6.8.1) is already installed, it will be replaced with latest version.
Amazon.Lambda.Templates::6.8.1 was successfully uninstalled.
Success: Amazon.Lambda.Templates::6.9.0 installed the following templates:
Template Name                                       Short Name                                    Language  Tags                 
--------------------------------------------------  --------------------------------------------  --------  ---------------------
Empty Top-level Function                            lambda.EmptyTopLevelFunction                  [C#]      AWS/Lambda/Serverless
Lambda Annotations Framework (Preview)              serverless.Annotations                        [C#]      AWS/Lambda/Serverless
Lambda ASP.NET Core Minimal API                     serverless.AspNetCoreMinimalAPI               [C#]      AWS/Lambda/Serverless
Lambda ASP.NET Core Web API                         serverless.AspNetCoreWebAPI                   [C#],F#   AWS/Lambda/Serverless
Lambda ASP.NET Core Web API (.NET 6 Container I...  serverless.image.AspNetCoreWebAPI             [C#],F#   AWS/Lambda/Serverless
Lambda ASP.NET Core Web Application with Razor ...  serverless.AspNetCoreWebApp                   [C#]      AWS/Lambda/Serverless
Lambda Custom Runtime Function (.NET 7)             lambda.CustomRuntimeFunction                  [C#],F#   AWS/Lambda/Function  
Lambda Detect Image Labels                          lambda.DetectImageLabels                      [C#],F#   AWS/Lambda/Function  
Lambda Empty Function                               lambda.EmptyFunction                          [C#],F#   AWS/Lambda/Function  
Lambda Empty Function (.NET 7 Container Image)      lambda.image.EmptyFunction                    [C#],F#   AWS/Lambda/Function  
Lambda Empty Serverless                             serverless.EmptyServerless                    [C#],F#   AWS/Lambda/Serverless
Lambda Empty Serverless (.NET 7 Container Image)    serverless.image.EmptyServerless              [C#],F#   AWS/Lambda/Serverless
Lambda Function project configured for deployme...  lambda.NativeAOT                              [C#],F#   AWS/Lambda/Function  
Lambda Giraffe Web App                              serverless.Giraffe                            F#        AWS/Lambda/Serverless
Lambda Simple Application Load Balancer Function    lambda.SimpleApplicationLoadBalancerFunction  [C#]      AWS/Lambda/Function  
Lambda Simple DynamoDB Function                     lambda.DynamoDB                               [C#],F#   AWS/Lambda/Function  
Lambda Simple Kinesis Firehose Function             lambda.KinesisFirehose                        [C#]      AWS/Lambda/Function  
Lambda Simple Kinesis Function                      lambda.Kinesis                                [C#],F#   AWS/Lambda/Function  
Lambda Simple S3 Function                           lambda.S3                                     [C#],F#   AWS/Lambda/Function  
Lambda Simple SNS Function                          lambda.SNS                                    [C#]      AWS/Lambda/Function  
Lambda Simple SQS Function                          lambda.SQS                                    [C#]      AWS/Lambda/Function  
Lex Book Trip Sample                                lambda.LexBookTripSample                      [C#]      AWS/Lambda/Function  
Order Flowers Chatbot Tutorial                      lambda.OrderFlowersChatbot                    [C#]      AWS/Lambda/Function  
Serverless Detect Image Labels                      serverless.DetectImageLabels                  [C#],F#   AWS/Lambda/Serverless
Serverless project configured for deployment us...  serverless.NativeAOT                          [C#],F#   AWS/Lambda/Serverless
Serverless Simple S3 Function                       serverless.S3                                 [C#],F#   AWS/Lambda/Serverless
Serverless WebSocket API                            serverless.WebSocketAPI                       [C#]      AWS/Lambda/Serverless
Step Functions Hello World                          serverless.StepFunctionsHelloWorld            [C#],F#   AWS/Lambda/Serverless
user@xxxxx folder % dotnet new lambda --list
Warning: use of 'dotnet new --list' is deprecated. Use 'dotnet new list' instead.
For more information, run: 
   dotnet new list -h

These templates matched your input: 'lambda'

Template Name                                       Short Name                                    Language  Tags                 
--------------------------------------------------  --------------------------------------------  --------  ---------------------
Empty Top-level Function                            lambda.EmptyTopLevelFunction                  [C#]      AWS/Lambda/Serverless
Lambda Annotations Framework (Preview)              serverless.Annotations                        [C#]      AWS/Lambda/Serverless
Lambda ASP.NET Core Minimal API                     serverless.AspNetCoreMinimalAPI               [C#]      AWS/Lambda/Serverless
Lambda ASP.NET Core Web API                         serverless.AspNetCoreWebAPI                   [C#],F#   AWS/Lambda/Serverless
Lambda ASP.NET Core Web API (.NET 6 Container I...  serverless.image.AspNetCoreWebAPI             [C#],F#   AWS/Lambda/Serverless
Lambda ASP.NET Core Web Application with Razor ...  serverless.AspNetCoreWebApp                   [C#]      AWS/Lambda/Serverless
Lambda Custom Runtime Function (.NET 7)             lambda.CustomRuntimeFunction                  [C#],F#   AWS/Lambda/Function  
Lambda Detect Image Labels                          lambda.DetectImageLabels                      [C#],F#   AWS/Lambda/Function  
Lambda Empty Function                               lambda.EmptyFunction                          [C#],F#   AWS/Lambda/Function  
Lambda Empty Function (.NET 7 Container Image)      lambda.image.EmptyFunction                    [C#],F#   AWS/Lambda/Function  
Lambda Empty Serverless                             serverless.EmptyServerless                    [C#],F#   AWS/Lambda/Serverless
Lambda Empty Serverless (.NET 7 Container Image)    serverless.image.EmptyServerless              [C#],F#   AWS/Lambda/Serverless
Lambda Function project configured for deployme...  lambda.NativeAOT                              [C#],F#   AWS/Lambda/Function  
Lambda Giraffe Web App                              serverless.Giraffe                            F#        AWS/Lambda/Serverless
Lambda Simple Application Load Balancer Function    lambda.SimpleApplicationLoadBalancerFunction  [C#]      AWS/Lambda/Function  
Lambda Simple DynamoDB Function                     lambda.DynamoDB                               [C#],F#   AWS/Lambda/Function  
Lambda Simple Kinesis Firehose Function             lambda.KinesisFirehose                        [C#]      AWS/Lambda/Function  
Lambda Simple Kinesis Function                      lambda.Kinesis                                [C#],F#   AWS/Lambda/Function  
Lambda Simple S3 Function                           lambda.S3                                     [C#],F#   AWS/Lambda/Function  
Lambda Simple SNS Function                          lambda.SNS                                    [C#]      AWS/Lambda/Function  
Lambda Simple SQS Function                          lambda.SQS                                    [C#]      AWS/Lambda/Function  
Lex Book Trip Sample                                lambda.LexBookTripSample                      [C#]      AWS/Lambda/Function  
Order Flowers Chatbot Tutorial                      lambda.OrderFlowersChatbot                    [C#]      AWS/Lambda/Function
normj commented 1 year ago

@bjhogan The ones you are calling out as missing are not showing up because the template name and short name don't have the word lambda in it. They just use the term serverless. You could make the argument we should put the word Lambda somewhere in the template name but they are already getting pretty long. You can see all of the AWS templates by using the following command.

dotnet new list --author AWS
bjhogan commented 1 year ago

@normj The instructions in the readme file state "To see a list of the Lambda templates execute dotnet new lambda --list", this no longer shows all the available templates.

I think the better known search use case is with a word like "Lambda", "Serverless", "API", "MVC", etc, as opposed to searching for the author of the template.

An update to the readme to include dotnet new list --author AWS might be helpful.

ashishdhingra commented 1 year ago

Changes made.

github-actions[bot] commented 1 year ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.