LearningKeeda

What is AWS Lambda Used For?

AWS Lambda is  a Serverless Computing on Amazon Web Services (AWS). It is a “Function-as-a-Service” (FaaS) that allows you to run code for virtually type of application or backend service without managing servers.

AWS Lambda is an event-driven compute services. Instead of having a server running 24/7 waiting for a request, Lambda only executes your code when triggered by a specific event. This could be anything from a user uploading a photo to an S3 bucket to a click on a website via an API.

How It Works
  1. Upload: You upload your code (written in Python, Node.js, Java, Go, etc.) to AWS Lambda.

  2. Trigger: You define a trigger—an event from another AWS service (like S3, DynamoDB, or Kinesis) or an HTTP request via API Gateway.

  3. Execute: Lambda automatically runs your code in an isolated container or microVM (using Firecracker technology), scales it to meet demand, and shuts it down once task is complete.

Benefits
  • Lambda scales horizontally by running multiple instances of your function in parallel. Whether you have 1 request or 10,000 per second, Lambda adapts instantly.

  • You are charged based on the number of requests and the duration your code runs (measured in milliseconds). If your code isn’t running, you aren’t paying.

  • Lambda automatically runs your code across multiple Availability Zones (AZs) to ensure high availability.

What is AWS Lambda Used For?
  • Real-time File Processing: Automatically generating thumbnails when an image is uploaded to Amazon S3.

  • Data Transformation (ETL): Validating and transforming data before it enters a database like DynamoDB.

  • Web Backends: Powering the logic behind mobile and web apps using Amazon API Gateway.

  • IoT Backends: Processing messages coming from millions of connected devices.

  • Scheduled Tasks: Running Cron jobs, such as daily report generation or database backups.

Technical Specifications (2026 Limits)
Feature Limit / Specification
Max Execution Time 15 minutes (900 seconds)
Memory Allocation 128 MB to 10,240 MB
Ephemeral Storage Up to 10 GB in the /tmp directory
Deployment Size 250 MB (unzipped) or 10 GB (container image)
Architectures x86_64 or ARM64 (AWS Graviton)
Lambda vs. Traditional Servers (EC2)

While Amazon EC2 gives you full control over the virtual machine (OS, network, etc.), it requires manual scaling and you pay for the instance even when it’s idle. Lambda is preferred when you want to focus entirely on code and leave the operations to AWS.

Exit mobile version