aws / aws/aws-lambda-dotnet

AWS Lambda Tools for PowerShell: PackageScript & PackageProject parameter sets aren't documented clearly

Open
#1,821 1 comment 0 reactions 0 assignees View on GitHub
doc-readme documentation module/lambda-client-lib p2 queued
Dominant language
C#
Stars
1.7k
Forks
503
Avg merge
1d 5h
Merged PRs (30d)
18

Description

### Describe the issue

While the comment-based help mentions script & project workflows in both `New-AWSPowerShellLambda` & `New-AWSPowerShellLambdaPackage`, it isn't very clear how one would utilize those two options.

For example, when creating a new script using the basic template with `New-AWSPowerShellLambda -Template Basic`
the output will create a new AWS Lambda PowerShell script `Basic.ps1` from template Basic.ps1.txt at `./Basic`.
If `New-AWSPowerShellLambdaPackage -ProjectDirectory ./Basic -OutputPackage ./Basic.zip` is run, packaging will fail as `ProjectDirectory` belongs to the `PackageProject` parameter set (but the error messaging isn't super clear on why).

tl;dr - it's easy to mix up the parameter sets unknowingly, and the comment-based help doesn't make that clear.

### Links

- https://github.com/aws/aws-lambda-dotnet/blob/master/PowerShell/Module/Public/New-AWSPowerShellLambda.ps1
- https://github.com/aws/aws-lambda-dotnet/blob/master/PowerShell/Module/Public/New-AWSPowerShellLambdaPackage.ps1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.