AWS Lambda's new self-managed code storage allows functions and layers to reference deployment packages directly from customer-owned S3 buckets, primarily addressing the per-Region account-level code storage quota. While this lifts an aggregate limit, it's crucial for system designers to understand that **individual function size limits (50 MB zipped, 250 MB unzipped, 10 GB for containers) remain unchanged**. The operational impact includes faster function activation and shifting storage costs to customer S3 bills.
Read original on InfoQ ArchitectureThe core of AWS Lambda's self-managed code storage enhancement is the distinction between an account-level storage quota and individual function package size limits. Previously, Lambda managed all deployment package storage, leading to a per-Region quota (default 75 GB, now 300 GB, and effectively unlimited with self-managed storage) that large serverless applications might hit. This new feature allows developers to store function and layer code in their own S3 buckets, bypassing this aggregate account quota entirely.
Crucial Distinction for Architects
System architects must understand that while the *aggregate storage quota* for all Lambda functions in an account is effectively removed, the *per-function package size limits* are not changed. This means a single function still cannot exceed 50 MB zipped (250 MB unzipped) or 10 GB for container images. This is a common misinterpretation, as highlighted in the article.
Beyond the quota relief, there are several operational changes. Lambda no longer creates an intermediate copy of the deployment package when referencing code directly from S3, which can speed up function activation after creation or updates. Cost-wise, the storage and retrieval expenses for deployment packages shift from being an implicit part of Lambda's pricing to explicit line items on the customer's S3 bill, offering greater transparency and control. Standard S3 storage and cross-Region transfer costs will apply.
While the deployment workflow remains largely the same, requiring an `UpdateFunctionCode` call, the benefit lies in providing a native, scalable option for teams with extensive serverless fleets. Infrastructure-as-code tools like Terraform are in the process of adding support for this new storage mode, indicating its growing adoption and importance for managing large-scale serverless deployments.