Serverless doesn't mean "no servers"; it means "I don't manage the server." AWS Lambda is the serverless platform where you upload code and define a trigger. In the right scenario, 90% cost savings; in the wrong one, chaos.
01. How Does It Work?
You upload a function (Python, Node.js, Java, .NET, etc.) to Lambda. When an event fires (an HTTP request, an S3 file upload, a DB change), the function runs, produces a response and shuts down. You pay only per millisecond it runs.
02. Use Cases
Scenarios where Lambda shines:
- Image processing (an automatic thumbnail when an image is uploaded to S3)
- API backend (API Gateway + Lambda)
- Scheduled tasks (CloudWatch Events + Lambda)
- Data transformations (streaming ETL)
03. Limitations
Lambda isn't infinitely flexible:
- Maximum 15-minute runtime
- Up to 10 GB of memory
- Cold-start latency (100-1000 ms of extra time on the first call)
For continuously running services, EC2 or ECS is more suitable.
04. Cost Analysis
Lambda cost formula: (request count × $0.20 / million) + (compute seconds × $0.0000166667 / GB-sec). If you have millions of requests a month, do the math; under continuous load, EC2 may be more economical.
05. Serverless Framework
To manage Lambda as code at scale, use the Serverless Framework, AWS SAM or Terraform. Manual Lambda deployment becomes unsustainable past 5+ functions.