Day 12/30 AWS AWS Lambda (clear info) AWS Lambda is a serverless compute service that lets you run…
Day 12/30 AWS
AWS Lambda (clear info)
AWS Lambda is a serverless compute service that lets you run code without managing servers. You upload your code, define when it should run, and AWS handles execution, scaling, and infrastructure.
⸻
How it works
* An event happens (like API call, file upload, cron job)
* That event triggers the Lambda function
* The function runs your code
* Output is returned or stored somewhere
* Execution stops automatically
⸻
Core components
* Function → Your code
* Trigger (Event source) → What starts the function
* Execution role (IAM) → Permissions (what Lambda can access)
* Environment variables → Config values (API keys, etc.)
* Timeout → Max execution time (up to 15 minutes)
* Memory → 128 MB to 10 GB (affects CPU too)
* Destination → Where result goes (S3, DB, API, queue)
⸻
Supported languages
* Python
* Node.js
* Java
* Go
* .NET
⸻
Pricing model
* Pay per request
* Pay per execution time (in milliseconds)
* No cost when idle
* Free tier available (1M requests/month)
⸻
Key features
* No server management
* Auto scaling
* Event-driven execution
* High availability (managed by AWS)
⸻
Common use cases
* File processing (image resize, video processing)
* Backend APIs (with API Gateway)
* Automation (cron jobs via CloudWatch)
* Data processing (streams, logs)
* Notifications (SNS, SQS)
⸻
Limitations
* Max execution time: 15 minutes
* Stateless (no memory between runs)
* Cold start latency (first run delay)
* Not ideal for long-running or heavy compute tasks
⸻
When to use
Use Lambda when:
* Work is event-based
* Tasks are short-lived
* You want low cost and auto scaling
Avoid when:
* Continuous processing is needed
* Long-running jobs
* Heavy CPU workloads
Comments
Comments from the original post on Instagram
No comments yet
