Lambda Flashcards

1
Q

What is Lambda?

A

Compute service where you can upload code and create a Lambda function.

Lambda takes care of provisioning and managing the servers that you use to run your code.

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

Uses for Lambda

A

Runs in response to Events

Compute Service
- Run in respone to HTTP request using API gateway. API call using AWS SDK

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

Languages supported by Lambda (5)

A
Node.js
Java
GO
Python
C#
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Pricing of Lambda

A

of requests

  • 1st million are free
  • $0.20 per request after that

Duration

  • time code runs (rounded to nearest 100ms) and amojunt of memory you allocate for your function
  • $0.00001667 for every GB second used
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Does Lambda support versioning?

A

Yes

Can publish 1 or more versions

But after publish a version it is immutable ( can only edit $LATEST)

Lambda latest version is in $LATEST

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

How to split traffic between Lambda function

A

Use alias and 2 different versions

But can’t do this with the latest version

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

What to use to debug Lambda

A

X-Ray

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

What is the default type of LambdaFunction

A

RequestResponse - synchronous. keep connection open until the function returns a response or times out. The API response includes the function response and additional data.

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

Describe LambdaFunction triggered by an event.

A

Asynchronous. Send events that fail multiple times to the function’s dead-letter queue (if it’s configured). THE API response only includes a status code.

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

How to validate parameter values and user or role has permission to invoke lambda function

A

DryRun

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

What is the concurrency execution limit for Lambda

A

1000

But must have minimum of 100 left so other lambda functions can be called concurrently with remaining bit.

Can set limit for each function but all functions cannot exceed 1000

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

If want to deploy to dev, test, and prod what feature of lambda should you use if you want different function for each.

A

Environment variables

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

Lambda feature for Zip archive that contains libraries, dependencies and other custom runtime info.

A

Layers

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

CloudWatch metrics for Lambda

A

total invocation requests

latency/Duration

error rates

throttles

Iterator age

Dead Letter Queue errors

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

What does it mean with you recieve InvalidParameterValueException

A

one of parameters in request is invalid

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

CodeStroageExceededException

A

exceeded max total code size per account

17
Q

ResourceConflictException

A

resource you want to create already exists

18
Q

ServiceException

A

AWS Lambda service has internal error

19
Q

How to make libraries available to Lambda function

A

Upload deployment package to Lambda

Store deployment package in S3 bucket then upload (required for packages over 50MB)

Create deployment package containing function code and libraries

If need for multiple lambda functions use Layers

20
Q

Max memory allocation for Lambda function

A

3GB or 3008MB

21
Q

Default memory size Lambda

A

128MB