Learn Programming, Tech & Coding · Free Online Tools

IT Question Answer
Back to AWS
AWS Lambda Serverless Computing

AWS Lambda Serverless Computing

AWS832 viewsBy Admin
awslambdaserverlesscomputing

What is AWS Lambda?

Lambda runs your code without managing servers. You upload a function; AWS runs it on demand and scales automatically. You pay only for execution time — nothing when idle.

A Lambda Function

exports.handler = async (event) => {
  return {
    statusCode: 200,
    body: JSON.stringify({ message: "Hello from Lambda!" })
  };
};

How It Works

  1. An event triggers the function (HTTP, file upload, schedule).
  2. AWS spins up the function, runs it, then shuts it down.
  3. You're billed per millisecond of execution.

Common Triggers

TriggerUse case
API GatewayREST APIs
S3Process uploads
EventBridgeScheduled jobs
DynamoDBReact to data changes

Pros & Cons

  • ✅ No servers, auto-scale, pay-per-use.
  • ❌ Cold starts, 15-min max runtime, harder debugging.

FAQs

What is serverless?

You write code; the cloud handles all infrastructure. "Serverless" doesn't mean no servers — just none you manage. More in our AWS section.

What is a cold start?

The delay when Lambda initializes a function that hasn't run recently.