Container Size Economics
How lambda-shell-runtime is 75% smaller than official runtimes
The Numbers Don’t Lie
| Runtime | Size | Difference |
|---|---|---|
| AWS Python 3.12 | 534MB | Baseline |
| lambda-shell-runtime:full | 417MB | 22% smaller |
| AWS Node.js 20 | 410MB | Baseline |
| lambda-shell-runtime:micro | 221MB | 46% smaller |
| lambda-shell-runtime:tiny | 132MB | 75% smaller |
| AWS provided base | 128MB | Bare minimum |
Why Size Matters
Cold start performance. Smaller containers start faster. The difference between 534MB and 132MB isn’t just storage - it’s network transfer time, container initialization, and memory allocation.
Cost efficiency. Lambda charges for memory allocation. Smaller runtimes need less memory to operate effectively.
Developer experience. Faster deployments, quicker iterations, less waiting.
The Shell Advantage
No Runtime Overhead
Python and Node.js runtimes include:
- Language interpreters
- Standard libraries
- Package managers
- Development tools
- Framework dependencies
Shell runtimes include:
- Bash (already in base image)
- Essential utilities
- Nothing else
Surgical Tool Selection
Instead of “everything you might need,” we provide “exactly what you need”:
- tiny:
jq,curl,http-cli(132MB) - micro: tiny +
awscurl(221MB) - full: tiny + AWS CLI (417MB)
Static Linking Strategy
Our build process creates statically-linked binaries:
- No shared library dependencies
- Smaller attack surface
- Predictable behavior
- Easier debugging
Real-World Impact
Deployment speed: 75% smaller = 75% faster uploads Memory efficiency: Run more functions per GB allocated Cost reduction: Lower memory requirements = lower bills
The Economics
At scale, container size becomes infrastructure cost:
# 1000 functions, 10 deployments/day
# Python runtime: 534MB × 1000 × 10 = 5.34GB/day transfer
# Shell tiny: 132MB × 1000 × 10 = 1.32GB/day transfer
# Savings: 4.02GB/day = 75% reduction
When Size Doesn’t Matter
- Single-function deployments
- Infrequent updates
- Memory-abundant environments
- Complex application dependencies
The Bigger Picture
Container size is a proxy for complexity. Smaller runtimes suggest:
- Clearer dependencies
- Focused functionality
- Easier maintenance
- Better understanding
The shell runtime isn’t just smaller - it’s simpler.
This is infrastructure economics: every MB matters at scale.