Lambda Invocation and Execution Flashcards

1
Q

What are the different AWS Lambda invocation modes?

A

The two primary AWS Lambda invocation modes are synchronous and asynchronous. Synchronous invocation waits for the function to process the event and return a response, while asynchronous invocation places the event in a queue for processing without waiting for a response.

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

How do versions work in AWS Lambda?

A

In AWS Lambda, a version is a snapshot of a Lambda function code and configuration at a given time. Each version is immutable once published, and AWS assigns a unique version number to it.

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

What are aliases in AWS Lambda?

A

Aliases in AWS Lambda are pointers to specific Lambda function versions. You can use aliases to route traffic between different versions of a function, enabling easy implementation of blue/green deployment strategies or A/B testing.

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

What factors contribute to AWS Lambda latency?

A

Factors contributing to AWS Lambda latency include cold start initialization time, the runtime execution time of the function, and the time taken to interact with other AWS services or external APIs if needed.

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

What are Lambda destinations?

A

Lambda destinations are AWS services where you can direct the result of a Lambda function execution for further processing. Destinations can be set for both successful and failed executions and include services like Amazon SNS, Amazon SQS, another Lambda function, or Amazon EventBridge.

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

How does the AWS Lambda execution context work?

A

The AWS Lambda execution context is a temporary runtime environment that initializes any external dependencies of your Lambda function’s code. AWS reuses the execution context for subsequent invocations if possible, to reduce latency.

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

How can you optimize AWS Lambda for lower latency?

A

To optimize AWS Lambda for lower latency, keep the function code lean, use environment variables for configuration, leverage VPC endpoints if accessing services in a VPC, and minimize dependencies. Additionally, implementing provisioned concurrency can mitigate cold starts.

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

What is the purpose of AWS Lambda versions and aliases?

A

Versions and aliases in AWS Lambda provide versioning support by allowing you to manage, invoke, and stage different versions of your Lambda functions. They facilitate A/B testing, gradual deployments, and rollback capabilities.

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

How do you choose the right AWS Lambda invocation mode?

A

Choose synchronous invocation when you need the immediate response from the Lambda function, and asynchronous invocation when the function can process the event in the background. Stream-based invocation is used for processing streams of records from Amazon DynamoDB Streams or Amazon Kinesis.

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

What are the benefits of Lambda destinations over the traditional error handling?

A

Lambda destinations provide a more flexible and configurable way to handle the success or failure responses of Lambda function executions, allowing you to decouple your function code from your error handling and success response workflows.

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