AWS Serverless and Lambda Architecture 1 — Questions and Answers
Question 1: What is the maximum execution timeout for an AWS Lambda function?
- 5 minutes
- 10 minutes
- 15 minutes (Correct answer)
- 30 minutes
Correct answer: 15 minutes
AWS Lambda functions can run for a maximum of 15 minutes (900 seconds) per execution.
Question 2: Which AWS service acts as the front door to Lambda functions for HTTP API calls?
- CloudFront
- API Gateway (Correct answer)
- Elastic Load Balancer
- Route 53
Correct answer: API Gateway
Amazon API Gateway is used to create, publish, and manage RESTful and WebSocket APIs that invoke Lambda functions.
Question 3: What is a Lambda 'cold start'?
- A Lambda function running at low CPU
- The initial latency when a new Lambda container is provisioned (Correct answer)
- A Lambda function invoked in a cold AWS region
- A Lambda function with no environment variables
Correct answer: The initial latency when a new Lambda container is provisioned
A cold start occurs when Lambda must provision a new execution environment, adding latency to the first invocation.
Question 4: Which Lambda feature eliminates cold starts by keeping a specified number of execution environments initialized?
- Reserved concurrency
- Provisioned concurrency (Correct answer)
- Function aliases
- Lambda layers
Correct answer: Provisioned concurrency
Provisioned concurrency pre-warms a set number of Lambda instances so they are always ready to respond without cold start delay.
Question 5: An application uses AWS Lambda and needs to share common dependencies across multiple functions. What is the best approach?
- Package dependencies into each function separately
- Use Lambda Layers to share code and libraries (Correct answer)
- Store dependencies in S3 and download at runtime
- Use an EC2 instance to host shared libraries
Correct answer: Use Lambda Layers to share code and libraries
Lambda Layers allow you to package and share libraries, custom runtimes, or other dependencies across multiple Lambda functions.
Question 6: Which AWS service lets you coordinate multiple Lambda functions into a visual workflow with branching, parallel execution, and error handling?
- AWS Batch
- Amazon SWF
- AWS Step Functions (Correct answer)
- Amazon EventBridge
Correct answer: AWS Step Functions
AWS Step Functions orchestrates serverless workflows by coordinating Lambda functions and other services using state machines.
What is the maximum execution timeout for an AWS Lambda function?