Lambda Flashcards
what are lambda destinations? Describe them and then list them.
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
What is a lambda execution role? what is it attached to? how does it work?
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.
what is a lambda resource policy and where is it attached?
It defines who can invoke the lambda function. It is attached to the lambda function.
What is AWS AppConfig Agent Lambda?
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
Where can you find the Lambda request id?
in the context object
what is AWSLambdaVPCAccessExecutionRole and when do you need it!
- allows Lambda to access stuff inside the vpc. You need it when you connect Lambda to your vpc /eni situation
What is a cognito post-authentication lambda trigger?
A lambda function that is automatically invoked by Amazon Cognito, when a user successfully authenticates to a user pool.
How can you prevent a cold start and the amount of time a first request takes?
use provisioned concurrency
For Lambda, how can you direct a small amount of traffic to a new version?
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 )
What is the Lambda deployment package and what goes in it?
It’s a ZIP file that contains your function code and
dependencies.
When do you need to create a Lambda deployment package?
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.
Where do you put the zip file and what if it is too large?
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.