-
Notifications
You must be signed in to change notification settings - Fork 89
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 chooseszip.Storeinstead ofzip.Deflate. - Update C# methods in
LambdaPackager.csand CLI wrappers to thread the compression flag and pass it to the native zip CLI (-0flag) 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.gosrc/Amazon.Lambda.Tools/LambdaPackager.cssrc/Amazon.Common. DotNetCli.Tools/Utilities.cs- Command option definitions and parser updates (
LambdaDefinedCommandOptions. csand relevant command classes)
This feature is opt-in; backwards compatible
Acknowledgements
- 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