Lambda Flashcards

1
Q

What is serverless?

A

Serverless is a cloud computing model where developers can run code without provisioning or managing servers. It automatically scales with usage and only charges for actual compute time, not idle time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is AWS Lambda?

A

A serverless compute service that runs code in response to events.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are examples of serverless services on AWS?

A

Lambda, DynamoDB, Cognito, API Gateway, S3, SNS, SQS, Kinesis Firehose, Aurora Serverless, Step Functions, Fargate.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does Lambda differ from EC2?

A

Lambda runs on-demand and scales automatically; EC2 requires manual provisioning and management.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What languages does Lambda support?

A

Node.js, Python, Java, C#, Ruby, and custom runtimes like Rust or Go.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is “Lambda container image support”?

A

Allows you to package and deploy Lambda functions as Docker container images, up to 10 GB in size. These images are stored in ECR and can include your app code, dependencies, and runtime, giving you more flexibility and control over the execution environment.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How is Lambda priced?

A

Lambda pricing is based on the number of requests and the compute time (measured in GB-seconds). You get 1 million free requests per month, and after that, it costs $0.20 per 1 million requests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are synchronous Lambda invocations?

A

Lambda invocations where results are returned immediately, e.g., via API Gateway or ALB.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What services use Lambda synchronous invocations?

A

ALB, API Gateway, CloudFront (Lambda@Edge), Cognito, Step Functions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is ALB Multi-Header Value support?

A

Allows Lambda to receive multiple values per HTTP header/query param as arrays.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are asynchronous Lambda invocations?

A

Lambda runs the function in the background, retries up to 3 times on failure, and can send failed events to a DLQ.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which services trigger Lambda asynchronously?

A

S3, SNS, CloudWatch Events, CodeCommit, SES, Config, IoT.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Lambda Event Source Mapping?

A

Maps services like SQS, Kinesis, DynamoDB Streams to Lambda for polling-based synchronous invocation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are Lambda Streams integrations?

A

Lambda reads from Kinesis or DynamoDB Streams and invokes your function with batches of records for real-time processing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How does Lambda handle stream errors?

A

Retries until success or expiry, configurable retries, split batch on error, discard to destination.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How does Lambda scale with SQS?

A

Up to 60 instances per minute for Standard; scales per message group for FIFO.

17
Q

What is the Lambda event object?

A

JSON-formatted input passed to your AWS Lambda function when it is invoked. It contains all the event data that triggered the function—this could come from an AWS service (like S3, API Gateway, DynamoDB, etc.) or a custom source

18
Q

What is the Lambda context object?

A

It’s a parameter passed to the Lambda handler that provides runtime info like the function name, memory limit, remaining execution time, and request ID. “What environment am I running in?”

19
Q

What is a Lambda Destination?

A

Target for async invocation results: SQS, SNS, another Lambda, or EventBridge.

20
Q

What is a Lambda execution role?

A

It’s an IAM role that the Lambda function assumes to gain permissions for calling other AWS services or resources during execution.

21
Q

What is a Lambda resource-based policy?

A

It’s a policy attached directly to your Lambda function, which grants permissions to other AWS accounts or services to invoke the function.

22
Q

What are Lambda environment variables?

A

String key/value pairs accessible by the function, optionally encrypted.

23
Q

What monitoring tools does Lambda integrate with?

A

CloudWatch Logs, Metrics, and X-Ray for tracing.

24
Q

How do you enable X-Ray tracing in Lambda?

A

Activate tracing in config, use SDK, ensure correct IAM role.