AWS Lambda

AWS Lambda

\

AWS Lambda is a serverless compute service provided by Amazon Web Services (AWS) that lets you run code without provisioning or managing servers. Lambda automatically scales your applications in response to incoming requests and you only pay for the compute time you consume.

Key Features of AWS Lambda

1. Serverless Execution

  • No need to manage servers: AWS handles infrastructure, scaling and maintenance.
  • Just upload your code and Lambda runs it when triggered.

 

2. Event-Driven Architecture

Lambda functions can be triggered by various AWS services like:

  • API Gateway (HTTP requests)
  • S3 (file uploads/deletions)
  • DynamoDB (database changes)
  • SNS/SQS (messaging services)
  • CloudWatch Events (scheduled tasks)
  • Kinesis (stream processing)

 

3. Automatic Scaling

  • Lambda automatically scales from a few requests per day to thousands per second.
  • Each request runs in an isolated environment.

4. Pay Per Use Pricing

You are charged based on:

  • Number of requests (per million invocations)
  • Execution duration (rounded to the nearest millisecond)

No cost when your function is idle.

 

5. Multiple Language Support

Supports several programming languages:

  • Node.js, Python, Java, C#, Go, Ruby, PowerShell and custom runtimes.

 

6. Stateless & Ephemeral

  • Lambda functions are stateless (no persistent local storage).
  • Temporary storage up to 10GB (/tmp directory) is available.
  • For persistent data, use services like S3, DynamoDB or EFS.

 

7. Integration with AWS Ecosystem

  • Easily connects with other AWS services for logging (CloudWatch), security (IAM), and deployment (SAM, CloudFormation).

Use Cases for AWS Lambda

  • Real time file processing (e.g., resizing images uploaded to S3)
  • Backend APIs (using API Gateway + Lambda)
  • Automated tasks (e.g., scheduled backups, CloudWatch triggered jobs)
  • Data processing (stream analytics with Kinesis)
  • Chatbots & Voice Assistants (Alexa skill backends)
  • Microservices architecture (small, independent functions)

Limitations

  • Execution Timeout: Max 15 minutes per invocation.
  • Memory Allocation: Between 128MB to 10GB (affects CPU power).
  • Cold Starts: Initial latency when a function is invoked after inactivity.
  • Concurrency Limits: Default soft limit of 1,000 concurrent executions (can be increased via AWS support).

Related Item