AWS Serverless Architecture and AWS Lambda 1 — Questions and Answers
Question 1: What is the maximum execution timeout for an AWS Lambda function?
- 5 minutes
- 15 minutes (Correct answer)
- 30 minutes
- 60 minutes
Correct answer: 15 minutes
AWS Lambda functions have a maximum execution timeout of 15 minutes (900 seconds), after which the function is terminated.
Question 2: Which AWS service allows you to run containers in a serverless manner without managing the underlying servers?
- Amazon ECS with EC2 launch type
- Amazon EKS on EC2
- AWS Fargate (Correct answer)
- Amazon EC2 Auto Scaling
Correct answer: AWS Fargate
AWS Fargate is a serverless compute engine for containers that removes the need to provision or manage EC2 instances.
Question 3: What is the maximum size of a Lambda deployment package uploaded directly (not via Amazon S3)?
- 10 MB
- 50 MB (Correct answer)
- 250 MB
- 500 MB
Correct answer: 50 MB
Lambda deployment packages uploaded directly have a 50 MB compressed limit; packages larger than 50 MB must be uploaded to S3 first.
Question 4: Which of the following can act as an event source trigger for an AWS Lambda function?
- Amazon EC2 instance state change via console
- Amazon S3 object creation (Correct answer)
- AWS Direct Connect link establishment
- Amazon VPC peering connection creation
Correct answer: Amazon S3 object creation
Amazon S3 can trigger Lambda functions on bucket events such as object creation, deletion, or restoration.
Question 5: In a serverless architecture, what does the term 'cold start' refer to?
- Lambda functions deployed in cold geographic regions
- The initial latency when Lambda initializes a new execution environment after inactivity (Correct answer)
- The cost overhead of running Lambda in reserved concurrency mode
- The process of archiving an idle Lambda function to Glacier
Correct answer: The initial latency when Lambda initializes a new execution environment after inactivity
A cold start is the extra latency incurred when Lambda must spin up a new execution environment because no warm instance is available.
Question 6: Which Lambda concurrency feature pre-initializes execution environments to eliminate cold start latency?
- Reserved concurrency
- Provisioned concurrency (Correct answer)
- On-demand concurrency
- Burst concurrency
Correct answer: Provisioned concurrency
Provisioned concurrency keeps a set number of Lambda execution environments initialized and ready, ensuring low-latency responses without cold starts.
Question 7: What is the default memory allocation for a newly created AWS Lambda function?
- 64 MB
- 128 MB (Correct answer)
- 256 MB
- 512 MB
Correct answer: 128 MB
New Lambda functions default to 128 MB of memory, which is also the minimum configurable value; the maximum is 10,240 MB.
What is the maximum execution timeout for an AWS Lambda function?