Lambda Flashcards

1
Q

what are lambda destinations? Describe them and then list them.

A

When you invoke a lambda function, asynchronously, you can configure lambda to route the results to a destination. Destinations can be: another lambda function , SQS, SNS, Eventbridge

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

What is a lambda execution role? what is it attached to? how does it work?

A

It defines what actions the Lambda function is allowed to perform when it runs. It’s attached to the lambda function itself. When the lambda function runs, it assumes the execution role.

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

what is a lambda resource policy and where is it attached?

A

It defines who can invoke the lambda function. It is attached to the lambda function.

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

What is AWS AppConfig Agent Lambda?

A

It acts as a local cache for your application’s configurations retrieved from AWS AppConfig.
* This eliminates the need for your Lambda function to repeatedly fetch configuration data from the AppConfig service on each invocation, reducing Latency

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

Where can you find the Lambda request id?

A

in the context object

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

what is AWSLambdaVPCAccessExecutionRole and when do you need it!

A
  • allows Lambda to access stuff inside the vpc. You need it when you connect Lambda to your vpc /eni situation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a cognito post-authentication lambda trigger?

A

A lambda function that is automatically invoked by Amazon Cognito, when a user successfully authenticates to a user pool.

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

How can you prevent a cold start and the amount of time a first request takes?

A

use provisioned concurrency

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

For Lambda, how can you direct a small amount of traffic to a new version?

A

Create an alias that points to both the new and previous versions of the function code and assign a weighting for sending a portion of traffic to the new version. (Yes, you can point an alias to multiple versions of your function code and then assign a weighting )

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

What is the Lambda deployment package and what goes in it?

A

It’s a ZIP file that contains your function code and
dependencies.

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

When do you need to create a Lambda deployment package?

A

You need to create a deployment package if:
1. You use the Lambda API to manage functions
or
2. You need to include libraries and dependencies other than the AWS SDK.

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

Where do you put the zip file and what if it is too large?

A

You can upload the package directly to Lambda, or you can use an Amazon S3 bucket,
and then upload it to Lambda. If the deployment package is larger than 50 MB, you
must use Amazon S3.

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