aws-lambda-dotnet icon indicating copy to clipboard operation
aws-lambda-dotnet copied to clipboard

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

Open sixfootdad opened this issue 4 months ago • 1 comments

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

sixfootdad avatar Sep 25 '24 21:09 sixfootdad