Lambda runtimes are now a resource you own, version and roll out, instead of a property of a function you redeploy. The mechanism is well designed, and it introduces one dependency that did not exist before: an ECR image your functions need to keep existing.
“You must keep the image in Amazon ECR while the version exists. If you delete the image, functions that use the version become Inactive.”
Executive summary
“AWS Lambda now supports customer-managed runtimes for Lambda Event Functions (formerly Lambda functions)” — note the rename in passing — and they are “a standalone resource type that fully decouples runtime management from function deployment”. Generally available “in all commercial AWS Regions”, with “no additional charge for customer-managed runtimes” beyond standard Lambda and ECR pricing.
The problem it solves is stated plainly: “Previously, sharing these through Lambda Layers or container images meant redeploying every function to pick up a change.” Now “Functions pick up updates automatically as Lambda recycles execution environments, so there's no need to redeploy each function or coordinate rollouts.”
The structure is familiar if you have used Lambda function versions and aliases, because it is the same shape one level up: a runtime has versions, versions are immutable, and an alias decides which version is live.
What changed
Shared components in Lambda have always had a redeployment problem. “Many organizations require every function to include approved components, such as SDKs, certificates, and security or monitoring tools”, and both existing distribution mechanisms — layers and container images — bind that content to the function's own deployment. A certificate bundle update meant touching every function that carried it.
A customer-managed runtime inverts the ownership. “Platform teams gain centralized control over the runtime contents, updates, access, and lifecycle, including the ability to push updates to shared components without per-function redeployments”, while “Application teams consume the runtime from their functions in the same way as a Lambda-managed runtime, preserving their familiar developer experience.”
The packaging is deliberately ordinary: “packaged as OCI container images in Amazon ECR and compatible with existing Docker and CI/CD tooling”. You build a runtime the way you already build images.
And a second rename lands in the same sentence as the first: “With this launch, the existing custom runtimes feature is renamed bring your own language.” If your documentation says custom runtime today, it now means something different from what the console will show.
Architecture
The same shape as function versions, one level up
| Concept | What it is |
|---|---|
| Runtime | The named resource platform teams own |
| Runtime version | “holds the contents… You publish it from a container image” — immutable |
| Runtime alias | The pointer that makes a version live |
| Function | Names an alias, never a version directly in normal use |
Two sentences define the deployment model completely: “No function uses a new version until you point a runtime alias to it. As a result, you can test a new version before you release it.” and “Every function that uses a customer-managed runtime must specify a runtime alias.”
So publishing a version is not a release — it is staging. The alias move is the release, and because aliases are per-runtime rather than per-function, one alias update reaches every consuming function. That is the whole value proposition and the whole blast radius in the same action.
Immutability by digest, which is stronger than it looks
“Versions are immutable. After you create a version, you can't change its image or capabilities.” And the enforcement is at the digest level: Lambda “Resolves the URI to an image digest, and returns it in the ResolvedUri field. The version always uses this digest. If you later move the tag to a new image, the version doesn't change.”
That closes the mutable-tag hole that makes container deployments unreproducible elsewhere. Publishing
from companyphp8:latest is safe here in a way it never is in a deployment pipeline,
because Lambda pins the digest at publish time and never looks at the tag again.
The dependency that did not exist before
“You must keep the image in Amazon ECR while the version exists. If you delete the image, functions that use the version become Inactive. This change can take up to 24 hours. Existing execution environments continue to handle invocations, but invocations that require a cold start fail.”
Read the failure shape carefully, because it is the worst kind. Warm environments keep serving. Cold starts fail. So a function at steady traffic looks healthy while every scale-out, every new environment and every function that went idle breaks — an error rate that correlates with traffic growth rather than with anything you changed, appearing up to a day after the change that caused it.
And the triggers are things an estate does automatically: “Deleting the repository or removing Lambda's access to the image has the same effect.” An ECR lifecycle policy that expires untagged or old images is exactly such a mechanism, and it has no idea a Lambda runtime version depends on that digest.
Recovery is clean, with one condition: “The functions recover automatically after you restore the image. The version refers to the image by digest (ResolvedUri), so the restored image must have an identical digest.” A rebuilt image is not the same image — you need the bytes back, not an equivalent.
Who needs access to what
The permission split is the point of the feature and is worth stating precisely. “Runtime consumers don't need access to your Amazon ECR images. They need only permission to use the runtime.” Application teams never touch the registry.
Publishers need more than they expect: “To create a runtime version, you need both Amazon ECR actions in addition to lambda:CreateRuntimeVersion”, and “Your identity needs these Amazon ECR permissions even after you grant Lambda access in the repository policy.” The repository policy covers Lambda's read; it does not cover yours.
Region and account placement
“The Amazon ECR repository must be in the same AWS Region as the runtime. The repository can be in a different AWS account”, and “To use a runtime in more than one Region, replicate the image to a repository in each Region.”
Cross-account is allowed, cross-Region is not. For a platform team serving a multi-Region estate, that makes ECR replication part of the runtime pipeline rather than an optimisation, and it means a runtime version in one Region is a different resource from its twin elsewhere.
Business value
The value is proportional to how many functions share a component. An organisation with a mandated monitoring agent across four hundred functions currently needs four hundred deployments to change it, coordinated across the teams that own them. That becomes one alias update.
The second-order value is that it makes the mandate enforceable without making the platform team a deployment bottleneck. Application teams keep their own release cadence; “Application teams consume the runtime from their functions in the same way as a Lambda-managed runtime”, so the shared content stops being something they have to remember to update.
And the staged-rollout controls are the part that makes it usable at scale: “Updates can be scheduled and staged to match change control policies, with centralized health metrics and rapid rollback.”
Security considerations
The runtime is now a supply-chain component with its own blast radius. One alias update changes the code running inside every consuming function, without any of those functions being deployed or reviewed. That is the feature, and it means the controls on who can publish a version and move an alias matter as much as the controls on function deployment itself.
The digest pin is a genuine security property. Because a version is fixed to a resolved digest and “If you later move the tag to a new image, the version doesn't change”, an attacker with push access to the repository cannot silently alter what an existing version runs. They would have to get a new version published and an alias moved.
Least privilege works well here. Consumers need no registry access at all, so the registry credentials stay with the platform team. That is a better separation than layers offered.
The ECR repository policy is load-bearing. “The repository policy must grant the Lambda service principal permission to read the image”, and removing that access has the same effect as deleting the image. A policy tightening exercise can take functions down a day later.
Cost considerations
“There is no additional charge for customer-managed runtimes; functions are billed at standard Lambda rates and standard Amazon ECR pricing applies to runtime images.” The feature itself is free; the storage is not.
The cost to actually plan for is image retention, and it is the inverse of the usual advice. Normally you expire old images aggressively. Here every version that exists needs its image kept, and versions linger by design — deletion has “a waiting period that you choose, from 7 to 30 days. The default is 30 days.” A runtime rebuilt weekly for patches accumulates images you cannot clean up on the usual schedule.
Multi-Region multiplies it, since each Region needs its own replicated copy.
Operational considerations
Exempt runtime images from ECR lifecycle policies, explicitly. This is the single highest-value operational action here, and it needs doing before the first version is published rather than after the first incident.
Use the dry run. “A dry run checks the image URI, that the image exists, that Lambda can access it, and that the version name is valid and not in use” — four failure modes caught before you create anything.
Wait for ACTIVE.
“An alias can point only to an ACTIVE version”, and a version starts in
CREATING while Lambda ingests the image. Automation that publishes and immediately moves
an alias needs the wait in between.
Name versions so the order is obvious. AWS recommends semantic or date-based schemes, within “1–128 characters”. With aliases hiding versions from consumers, the version name is the only thing an operator reads during a rollback.
Remember that updates land on environment recycling, which is Lambda's timing and not yours. A function at low traffic may run the old version considerably longer than one at high traffic.
Tradeoffs
| Choice | What you gain | What it costs |
|---|---|---|
| Customer-managed runtime | One alias update reaches every function; consumers need no registry access | An ECR image your functions depend on indefinitely |
| Lambda layers, as before | No new resource type, no registry dependency | Every change means redeploying every function |
| Aggressive ECR lifecycle policies | Lower registry storage cost | Cold starts fail up to 24 hours later, on functions nobody deployed |
| Multi-Region runtimes | The same approved runtime everywhere | Replication per Region, and a separate resource in each |
Implementation guidance
Protect the images first. Before publishing a version, make sure no lifecycle rule can reach the images that back it, in every Region.
Create the test alias before you need it. The documented path for a first version is a
dev alias plus a test function, because nothing can consume a version otherwise.
Give publishers the two ECR actions as well as the Lambda one, since the repository policy does not substitute for the caller's own permissions.
Decide your deletion waiting period deliberately — it is yours to choose between 7 and 30 days, and it is the window in which a mistaken deletion is recoverable.
Update your vocabulary in docs and tickets. Functions are Event Functions; the old custom runtimes are “bring your own language”.
Best practices
Treat the runtime pipeline with the seriousness of a deployment pipeline, because that is what it is now. The alias move is a production change affecting every consuming function, and it should have the same approvals as one.
Keep a per-Region inventory mapping runtime version to image digest. When an image goes missing the digest is the only thing that restores it, and the error will arrive as failing cold starts rather than as a registry alarm.
Stage through aliases deliberately — a dev alias ahead of prod, Region
by Region — rather than updating one alias everywhere at once. The feature gives you the control;
using it is a choice.
Who should adopt this and when
Adopt now if a mandated component ships inside many functions. Certificates, agents and SDK baselines are the cases where per-function redeployment is the actual cost.
Adopt now if you already build Lambda container images, since the tooling and the registry are the ones you have.
Wait if your ECR lifecycle management is not under your control, because the dependency runs the wrong way for an automated cleaner.
Nothing to do for a handful of functions. Layers remain simpler, and this adds a resource type, a registry dependency and a rollout model to manage.
Key takeaways
The alias is the deployment: “No function uses a new version until you point a runtime alias to it”, and “Every function that uses a customer-managed runtime must specify a runtime alias.” Publishing stages; moving the alias releases, to every consumer at once.
The new dependency is the image:
“You must keep the image in Amazon ECR while the version exists”, and deleting it
makes functions Inactive within 24 hours, where warm environments keep working and cold
starts fail. Recovery needs the identical digest, not an equivalent rebuild.
And two renames shipped alongside: Lambda functions are now Lambda Event Functions, and the old custom runtimes feature is now bring your own language.
Official AWS references
- AWS Lambda now supports customer-managed runtimes — the announcement: a standalone resource type decoupling runtime management from function deployment, the layers and container-image redeployment problem it replaces, automatic pickup as Lambda recycles execution environments, scheduled and staged updates with centralized health metrics and rapid rollback, the rename of Lambda functions to Lambda Event Functions and of custom runtimes to bring your own language, general availability in all commercial Regions, and the pricing statement
- Runtime versions — that a version is published from an ECR image and is immutable, digest resolution via
ResolvedUriand that moving a tag does not change the version, that no function uses a version until an alias points to it and every consuming function must specify an alias, the full Amazon ECR requirements including image retention and theInactivebehaviour with failing cold starts, same-Region and cross-account repository rules, the publisher permissions including the two ECR actions, the version states and the 7-to-30-day deletion waiting period, the dry run, and version name rules - Monitoring customer-managed runtimes — further reading on the per-version and per-alias health metrics used to track a rollout; no claims in this post are drawn from it
- Runtime aliases — further reading on alias compatibility and staged rollout; no claims in this post are drawn from it
- Deleting and restoring runtimes — further reading on scheduled deletion, restoration, and container image charges; no claims in this post are drawn from it
Comments