Lambda Layers
ELI5 — The Vibe Check
Lambda Layers are like shared backpacks for your Lambda functions. Instead of every function carrying its own copy of heavy libraries, they all share one backpack. Your deployment packages get smaller, updates happen in one place, and you stop uploading the same 50MB of node_modules seventeen times.
Real Talk
AWS Lambda Layers are ZIP archives containing supplementary code (libraries, custom runtimes, dependencies) that can be shared across multiple Lambda functions. Each function can use up to 5 layers, and layers are versioned independently, enabling dependency management without bloating individual function packages.
Show Me The Code
# Create a layer with shared dependencies
zip -r my-layer.zip python/
aws lambda publish-layer-version \
--layer-name shared-utils \
--zip-file fileb://my-layer.zip \
--compatible-runtimes python3.12
When You'll Hear This
"Put the common libs in a Lambda Layer so we're not duplicating them." / "Our layer has all the shared utilities — functions just reference it."
Related Terms
Cloud Function
A cloud function is a piece of code you deploy to the cloud that runs when triggered — by an HTTP request, a file upload, a timer, or another event.
Cold Start
A cold start is the delay you get when a serverless function hasn't been used for a while and the cloud needs to spin up a fresh container to run it.
Dependency
A dependency is a package your project relies on to work. Your app depends on React to render UI, axios to make requests, and dotenv to read config.
Serverless
Serverless doesn't mean there are no servers — it means YOU don't have to think about servers. Someone else manages them, scales them, and patches them.