What is AWS Lambda?
Why Interviewers Ask This
This is a classic screening question for AWS / Cloud Computing roles. Hiring managers ask it early in interviews to gauge your baseline understanding and determine if you can communicate technical concepts clearly.
Answer
AWS Lambda is a serverless compute service that runs code in response to events without provisioning or managing servers. You pay only for the compute time consumed — no charge when code is not running. How it works: upload code (Python, Node.js, Java, Go, Ruby, C#, PowerShell, or custom runtime) → define triggers (events that invoke the function) → Lambda executes the function in a managed container. Execution model: function is invoked → Lambda creates a container with your code and dependencies → executes the handler function → returns result → container may be reused for subsequent invocations (warm start — faster) or destroyed. Invocation types: Synchronous (request/response — API Gateway, Cognito, ALB); Asynchronous (fire-and-forget — S3 events, SNS, EventBridge); Event source mapping (polls queues/streams — SQS, Kinesis, DynamoDB Streams). Configuration: Memory: 128MB to 10GB (CPU proportional to memory); Timeout: up to 15 minutes; Ephemeral storage: /tmp up to 10GB. Event triggers: API Gateway (REST/HTTP API), S3 (file upload), DynamoDB Streams, Kinesis, SQS, SNS, EventBridge (scheduled or event-driven), ALB, Cognito, CloudFront. Pricing: $0.20 per 1M requests + $0.00001667 per GB-second. Free tier: 1M requests/month + 400,000 GB-seconds/month. Best for: event-driven processing, APIs with variable traffic, data transformation, scheduled jobs. Cold start: first invocation has extra latency (~100ms to several seconds). Mitigate with Provisioned Concurrency.
Common Mistake
Candidates often give textbook answers here. Interviewers are more impressed when you relate the concept to a specific problem you solved in a real AWS / Cloud Computing project.