aws / aws/aws-extensions-for-dotnet-cli
dotnet lambda package-ci CodeUri unchanged if hash of project is the same
- Dominant language
- C#
- Stars
- 393
- Forks
- 90
- Avg merge
- 2d 19m
- Merged PRs (30d)
- 3
Description
The SAM Serverless::Function property AutoPublishAlias will attempt to re-deploy a lambda if the CodeUri changes.
The CodeUri produced from
> dotnet lambda package-ci
is always different, even if the lambda code doesn't change.
This causes issues deploying changes to the other resources in the SAM template, because if you don't also change the lambda code you get a "A version for this Lambda function exists" error and the stack update rolls back.
Is there a way to set the zip file name in the codeuri to a hash of some sort?
Contributor guide
Research direction
Start by reproducing the behavior with `dotnet lambda package-ci` and compare the generated CodeUri when the Lambda project hash is unchanged. Trace how the package filename is produced and how it is consumed by the SAM `AWS::Serverless::Function` `CodeUri`; done means unchanged code produces a stable URI and avoids the reported version error during unrelated stack updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, csharp
- Domain
- build-system, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100