aws-lambda-dotnet
aws-lambda-dotnet copied to clipboard
AWS Lambda Tools for PowerShell: PackageScript & PackageProject parameter sets aren't documented clearly
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