Safeguard
Security Guides•

Serverless and edge dependency security: your questions answered

Short, sourced answers on layers, runtimes, bundling, size limits and patching for Lambda, Workers, Vercel edge and CloudFront edge functions.

Safeguard Security Team
4 min read

In serverless and edge platforms, the vendor patches the runtime and you patch your dependencies. The packaging choice, whether zip, layer, container or bundle, decides how fast you can do that. The answers below are short, tied to vendor documentation, and link to longer posts.

Who patches what

Does the platform patch my npm or pip packages? No. AWS's Node.js packaging guidance says that under the shared responsibility model you manage the dependencies in your deployment package. Cloudflare's runtime updates do not rewrite your bundle either. See Workers runtime updates versus dependency updates.

Does a container Lambda pick up a new base image on its own? No. AWS says you must rebuild the image and update the function. See rebuilding after a base image update.

Packaging

How big can a Lambda zip be? AWS lists 50 MB zipped through the API or SDKs and 250 MB unzipped including layers, and 10 GB for container images. See package size limits.

How many layers can one function use? Five, per AWS. See what to do at the limit.

Should Go or Rust functions use layers? AWS recommends against it. See why.

Can I convert a zip function to a container? Not in place. See the migration plan.

Edge specifics

Which edge option can carry libraries? CloudFront Functions allow 10 KB of code and libraries, and Lambda@Edge allows 50 MB. See where dependencies fit.

Can Lambda@Edge use layers? No. See what Lambda@Edge does not support.

Which npm packages run on Vercel's Edge runtime? ES module packages that avoid native Node.js APIs and eval. See the compatibility rules.

Runtimes and lifecycle

What happens when a runtime is deprecated? On Cloud Run functions you get notice about 90 days ahead, and after decommission you cannot update. See the lifecycle. For Azure Functions, see the current support status.

A one page summary

PlatformYou patchThe platform patches
Lambda zipPackages in the zip and layersManaged runtime, per your update setting
Lambda containerEverything in the imageAWS publishes base images, you rebuild
Lambda@EdgePackages in the zipRuntime, Auto mode only
CloudFront FunctionsYour small scriptThe runtime
Cloudflare WorkersPackages in the bundleThe Workers runtime
Vercel EdgePackages in the bundleThe edge runtime

The pattern is the same everywhere: anything inside your artifact is yours.

What to do first

  1. List every function and where it runs.
  2. Record the package source for each one: lockfile, SBOM or image.
  3. Scan on every build and on a schedule.
  4. Give each function an owner and a runtime end date.

Try it yourself

Open the demo and trace one package across services. Doing this once makes the rest of the list concrete.

Click through it at your own pace, or open it full screen.

Where Safeguard fits

Safeguard provides SBOM and dependency scanning, reachability analysis and asset discovery for the source and builds behind your functions. Free scan: gold.safeguard.sh/scan.

Quick check

What is the one rule that holds across platforms?

Whatever is inside the artifact you upload is yours to patch. The platform handles the runtime.

Where do I start if I have hundreds of functions?

Build the inventory first, then rank by internet exposure and runtime end date.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.