CLF-C02 ยท Compute services
Serverless compute: AWS Lambda and AWS Fargate
AWS Lambda for event-driven functions and AWS Fargate for running containers without managing servers, and what serverless removes from the customer's duties.
Key points
- AWS Lambda runs event-driven functions; you upload code, AWS runs and scales it, and a single invocation can last up to 15 minutes.
- AWS Fargate runs containers for Amazon ECS or Amazon EKS without EC2 instances to provision, patch or scale.
- Serverless removes server provisioning, OS maintenance and capacity planning from the customer; code, data and IAM permissions stay with the customer.
Source: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
Practice questions
What is the maximum run time of a single standard AWS Lambda function invocation?
- 5 minutes
- 15 minutes
- 1 hour
- 24 hours
Show answer
Answer: B. 15 minutes
The Lambda function timeout can be set up to 900 seconds, which is 15 minutes. Work that runs longer belongs on a service such as Fargate, AWS Batch or EC2.
When a team runs code on AWS Lambda, which tasks does AWS take care of?
- Maintaining the servers and operating system
- Provisioning capacity and scaling it automatically
- Writing and testing the function code
- Granting the function the IAM permissions it needs
- Classifying and protecting the data the function uses
Show answer
Answer: A. Maintaining the servers and operating system, B. Provisioning capacity and scaling it automatically
Lambda handles server and operating system maintenance plus capacity provisioning and automatic scaling. Writing the function code, granting it IAM permissions and protecting the data it handles remain customer duties.
"Serverless" means that no servers are involved at all when an AWS Lambda function runs.
Show answer
Answer: False
False. Lambda code still runs on servers; AWS provisions, maintains and scales them, so the customer never has to see or manage them.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
