awslabs / awslabs/aws-lambda-powershell-runtime

Compress runtime/modules to reduce deployment package unzipped size

Đang mở
#37 9 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
PowerShell
Star
65
Fork
21
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

AWS Lambda limits ZIP deployment packages to 250 MB on-disk. The Linux PowerShell release builds are ~170 MB in the current release, which takes up ~70% of that cap. (Community members' attempts at producing "slim" PowerShell containers only reduce sizes by ~30MB, which isn't a ton in broader context.)

Pure PowerShell script modules are generally quite small, but compiled CLR module assemblies or autogenerated modules (e.g. `Microsoft.Graph.*`, `Az.*`, `AWS.Tools.*`) can get very large.

The current architecture only allows for ~80MB of module dependencies - `AWS.Tools.S3` and `Microsoft.Graph.Users` (with respective dependencies) breaches the 250MB cap.

Compressing the PowerShell runtime itself would:
* Free up >100MB of deployment package size (172MB vs 66 MB)
* Unblock build artifact verification (PowerShell publishes SHAs of release artifacts)

Supporting compressed module dependencies (e.g. `/opt/modules-packed.zip` or `/opt/modules-packed/*.nupkg` gets unpacked to `/tmp/modules-unpacked` and added to PSModulePath) could help the situation as well.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng việc xem xét quy trình đóng gói bản phát hành của Linux PowerShell và cách các dependency của module được đưa vào deployment ZIP. So sánh artifact 172 MB hiện tại với runtime được nén hoặc các module được đóng gói được đề xuất, đồng thời xem xét các đường dẫn /opt và /tmp của AWS Lambda đã đề cập. Hoàn tất có nghĩa là artifact bản phát hành nhỏ hơn đáng kể, các dependency của module vẫn khả dụng và việc xác minh artifact không còn bị chặn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
aws, powershell
Lĩnh vực
build-system, cloud
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.