aws / aws/aws-extensions-for-dotnet-cli
Feature Request: Option to disable ZIP compression for faster Lambda packaging
- Dominant language
- C#
- Stars
- 393
- Forks
- 90
- Avg merge
- 2d 19m
- Merged PRs (30d)
- 3
Description
### Describe the feature
Packaging Lambda functions with the AWS Extensions for .NET CLI currently uses Deflate ZIP compression, which can significantly slow down build times, particularly for large projects or in CI/CD workflows. Since AWS Lambda unpacks zipped archives upon deployment, the benefit of compression is mainly in transit, and build time is the primary concern for developers. An option to disable ZIP compression—using "store only"—would allow for much faster package creation with minimal trade-off for most users.
### Use Case
Developers or CI/CD pipelines working with large Lambda deployments face long wait times due to compression, while upload size is rarely the bottleneck. This option helps speed up rapid iteration, making the build process more productive and responsive.
### Proposed Solution
- Add a CLI option (`--disable-zip-compression`) to the packaging commands.
- In the Go zip utility (`build-lambda-zip.go`), add a flag that chooses `zip.Store` instead of `zip.Deflate`.
- Update C# methods in `LambdaPackager.cs` and CLI wrappers to thread the compression flag and pass it to the native zip CLI (`-0` flag) and Go utility, as needed.
- Document clearly in helptext and CLI output.
- Default to current behavior unless the user opts in.
### Other Information
Other Information
Relevant code files for maintainers:
- `src/Amazon.Lambda.Tools/BuildLambdaZip/build-lambda-zip.go`
- `src/Amazon.Lambda.Tools/LambdaPackager.cs`
- `src/Amazon.Common. DotNetCli.Tools/Utilities.cs`
- Command option definitions and parser updates (`LambdaDefinedCommandOptions. cs` and relevant command classes)
This feature is opt-in; backwards compatible
### Acknowledgements
- [x] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### Targeted .NET platform
Any modern .NET version supported by the tool (.NET Core 3.1, .NET 6, .NET 8, etc.)
### CLI extension version
5.13.2
### Environment details (OS name and version, etc.)
All major platforms: Windows, Linux, macOS, Amazon Linux
Contributor guide
Research direction
Start with src/Amazon.Lambda.Tools/BuildLambdaZip/build-lambda-zip.go and src/Amazon.Lambda.Tools/LambdaPackager.cs, then trace the command option definitions, parser updates, and CLI wrappers named in the issue. Confirm how the compression flag reaches the native zip CLI and Go utility; done means an opt-in --disable-zip-compression path uses store-only compression, preserves the default, and is reflected in helptext and CLI output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, csharp, go
- Domain
- build-system, cli, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100