What is AWS Lambda?
AWS Lambda is a serverless compute service that runs code in response to events without provisioning or managing servers.
What does “serverless” mean in AWS Lambda?
You don’t manage servers. AWS handles infrastructure, scaling, patching, and availability.
What triggers a Lambda function?
Events from services like:
Amazon S3
Amazon API Gateway
Amazon EventBridge
Amazon DynamoDB
Amazon SQS
Amazon SNS
Are Lambda functions stateful?
No. They are stateless. it stores states externally. by using:
Amazon DynamoDB
Amazon S3
Amazon ElastiCache
What is the maximum Lambda execution timeout?
15 minutes (900 seconds).
How is CPU allocated in Lambda?
CPU power scales proportionally with memory allocation (128 MB – 10,240 MB).
How is Lambda billed?
Based on:
Number of requests
Execution duration (GB-seconds)
Provisioned concurrency (if enabled)
What is Lambda concurrency?
The number of function instances serving requests simultaneously.
Number of parallel executions
Types:
Unreserved concurrency
Reserved concurrency
Provisioned concurrency
What is a cold start?
When Lambda initializes a new execution environment, causing increased latency.
What happens when Lambda runs inside a VPC?
It creates ENIs in subnets. Internet access requires a NAT Gateway.
How do you expose Lambda as a REST API?
Using Amazon API Gateway.
How can Lambda process uploaded files?
Trigger Lambda from Amazon S3 object creation events.
Can Lambda process streams?
Yes, from:
Amazon Kinesis
Amazon DynamoDB Streams
How does Lambda integrate with queues?
Lambda polls Amazon SQS automatically.
How do you coordinate multiple Lambda functions?
Using AWS Step Functions.
What is a Lambda execution role?
An IAM role that grants Lambda permission to access AWS services.
What are Lambda resource policies used for?
To allow other AWS services/accounts to invoke the Lambda function.
How is Lambda environment data protected?
Environment variables are encrypted at rest using AWS KMS.
Does Lambda auto-scale?
Yes, automatically scales per request up to account concurrency limits.
What happens when concurrency limit is exceeded?
Lambda throttles requests (HTTP 429 or retry behavior depending on trigger).
What’s the difference Async vs Sync Invocation?
Sync ? Caller waits for response (API Gateway)
Async ? Event queued and retried on failure (S3, SNS)
You need near real-time processing of uploaded images. What service combination?
S3 + Lambda
You need long-running workflows with retries and branching logic.
Lambda + Step Functions
Reduce cold starts for latency-sensitive APIs.
Enable Provisioned Concurrency