Lambda II Flashcards

1
Q

What are CloudFront Functions?

A

Lightweight JavaScript functions for high-scale, low-latency customizations at the CDN edge.

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

What is Lambda@Edge?

A

NodeJS/Python Lambda functions replicated to CloudFront locations, allowing deeper request/response customization.

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

When is CloudFront Functions preferred?

A

For lightweight operations like cache key manipulation, header rewriting, and URL redirects.

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

When is Lambda@Edge preferred?

A

When needing network access, third-party libraries, file access, or complex logic.

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

What is the execution environment of Lambda by default?

A

Outside your VPC, so it can’t access private VPC resources.

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

How can Lambda access resources inside a VPC?

A

Attach it to a VPC with subnet and security group, and use AWSLambdaVPCAccessExecutionRole.

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

Does Lambda in a VPC have internet access by default?

A

No, you need a NAT Gateway or VPC endpoint for internet or AWS service access.

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

What is the Lambda /tmp directory?

A

Temporary storage with 10GB limit, persists during warm context reuse.

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

What are Lambda Layers?

A

Packages of code or dependencies that can be shared across Lambda functions.

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

How can Lambda mount persistent storage?

A

By mounting EFS via access points inside a VPC.

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

What is Lambda reserved concurrency?

A

It limits how many executions can run simultaneously for a function.

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

What happens when Lambda hits concurrency limits?

A

Sync calls get ThrottleError; async are retried or sent to DLQ.

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

What is a cold start in Lambda?

A

Initial setup time when a new container instance starts for your function.

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

How can cold starts be avoided?

A

Use Provisioned Concurrency to keep function instances pre-initialized.

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

How to handle external dependencies in Lambda?

A

Package with your deployment zip or use Lambda Layers.

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

What is the Lambda function URL?

A

Dedicated HTTPS endpoint for invoking Lambda functions publicly.

17
Q

How to secure Lambda function URLs?

A

Use IAM-based AuthType, resource-based policies, or CORS for browser-based access.

18
Q

What are Lambda versions?

A

Immutable snapshots of code and config, each with its own ARN.

19
Q

What are Lambda aliases?

A

Mutable pointers to versions, enabling stable routing, traffic shifting, and deployments.

20
Q

How does CodeDeploy help Lambda?

A

Enables automated deployments with canary or linear traffic shifting.

21
Q

How large can a Lambda container image be?

A

Up to 10 GB.

22
Q

What are AWS Lambda regional limits?

A

Max 10 GB memory, 15-minute timeout, 1000 concurrent executions (default).

23
Q

What is Lambda execution context?

A

Warm environment reused between invocations to reduce initialization overhead.

24
Q

How to optimize Lambda performance?

A

Perform initialization outside the handler, minimize package size, use environment variables.

25
What does AWS CodeGuru provide for Lambda?
Profiling and performance insights for Java and Python functions.