aws-extensions-for-dotnet-cli icon indicating copy to clipboard operation
aws-extensions-for-dotnet-cli copied to clipboard

Lambda deploy-serverless fails with new 6.0.0 version

Open gilliganc opened this issue 1 month ago • 3 comments

Describe the bug

Build in GitHub actions work with version 5.13.2 but fail with 6.0.0 with the below error now for deploy-serverless. This applies to rerunning past builds that worked as we did not force a version for the lambda tools before. Forcing the version back to 5.13.2 makes the builds to work again.

Initiate packaging of . for resource xxxxxxx
Unknown error executing command: Object reference not set to an instance of an object.

Regression Issue

  • [x] Select this option if this issue appears to be a regression.

Expected Behavior

Build and deploy like it did with version 5.13.2

Current Behavior

Run dotnet lambda deploy-serverless -pl xxxxxx --config-file aws-lambda-tools-defaults-Dev.json -tp $CFParams
Amazon Lambda Tools for .NET Core applications (6.0.0)
Project Home: https://github.com/aws/aws-extensions-for-dotnet-cli, https://github.com/aws/aws-lambda-dotnet
	
Processing CloudFormation resource xxxxxx
Initiate packaging of . for resource xxxxxxx
Unknown error executing command: Object reference not set to an instance of an object.
   at Amazon.Common.DotNetCli.Tools.Utilities.DetermineProjectLocation(String workingDirectory, String projectLocation) in C:\build\src\Amazon.Common.DotNetCli.Tools\Utilities.cs:line 490
   at Amazon.Common.DotNetCli.Tools.Commands.BaseCommand`1.ParseCommandArguments(CommandOptions values) in C:\build\src\Amazon.Common.DotNetCli.Tools\Commands\BaseCommand.cs:line 165
   at Amazon.Lambda.Tools.Commands.PackageCommand.ParseCommandArguments(CommandOptions values) in C:\build\src\Amazon.Lambda.Tools\Commands\PackageCommand.cs:line 97
   at Amazon.Common.DotNetCli.Tools.Commands.BaseCommand`1..ctor(IToolLogger logger, String workingDirectory, IList`1 possibleOptions, String[] args) in C:\build\src\Amazon.Common.DotNetCli.Tools\Commands\BaseCommand.cs:line 53
   at Amazon.Lambda.Tools.Commands.LambdaBaseCommand..ctor(IToolLogger logger, String workingDirectory, IList`1 possibleOptions, String[] args) in C:\build\src\Amazon.Lambda.Tools\Commands\LambdaBaseCommand.cs:line 21
   at Amazon.Lambda.Tools.Commands.PackageCommand..ctor(IToolLogger logger, String workingDirectory, String[] args) in C:\build\src\Amazon.Lambda.Tools\Commands\PackageCommand.cs:line 86

Reproduction Steps

dotnet tool install -g Amazon.Lambda.Tools dotnet lambda deploy-serverless -pl xxxxxx --config-file aws-lambda-tools-defaults-Dev.json -tp $CFParams

Possible Solution

No response

Additional Information/Context

No response

Targeted .NET platform

.NET 8.0.x in a github action

CLI extension version

can't currently do this in our build pipeline

Environment details (OS name and version, etc.)

linux github action runner

gilliganc avatar Dec 15 '25 03:12 gilliganc

I have recreated the issue and will work on getting a fix out as soon as I can.

normj avatar Dec 15 '25 04:12 normj

PR is out https://github.com/aws/aws-extensions-for-dotnet-cli/pull/415. I'll try and get this released as soon as I can.

normj avatar Dec 15 '25 05:12 normj

thanks for the fast turnaround!

gilliganc avatar Dec 15 '25 09:12 gilliganc

Version 6.0.1 is released with the fix. Thanks again for reporting the issue and sorry for the inconvenience.

normj avatar Dec 15 '25 22:12 normj

Thanks for the really fast turn around and i can confirm the fix is working in our environment so i will close the issue.

gilliganc avatar Dec 16 '25 01:12 gilliganc

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.

github-actions[bot] avatar Dec 16 '25 01:12 github-actions[bot]