Add support for packed modules to keep deployments <250mb #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Related to #37.
Description of changes:
This PR adds support for customers to deploy compressed archives of modules, then unpack them at runtime. This provides a compelling option for customers with large sets of dependent modules, who would otherwise be constrained to 250MB minus the size of the PowerShell runtime (currently ~172 MB runtime size --> 78 MB dependency size).
Two forms of compressed dependencies are supported:
modules.zip
. The contents of this archive are unpacked to a subdirectory of /tmp as-is. This format assumes someone's zipping a folder in$env:PSModulePath
(or somewhere they saved several modules into) and trades layer support/reproducability for better compression ratios..nupkg
files, in a subdirectory namedmodule-nupkgs
. These packages are "saved" (installed) to a subdirectory of/tmp
via PSResourceGet. This should broadly align with the ideas behind Lambda's layer architecture, and allows for direct package usage (as a binary, without unpacking/etc.) off a given NuGet feed.Both forms of dependencies:
/opt/
(for layers) or$env:LAMBDA_TASK_ROOT
(for function packages).By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.