Bitzu

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

Single choice

What is the maximum run time of a single standard AWS Lambda function invocation?

  1. 5 minutes
  2. 15 minutes
  3. 1 hour
  4. 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.

Select all that apply

When a team runs code on AWS Lambda, which tasks does AWS take care of?

  1. Maintaining the servers and operating system
  2. Provisioning capacity and scaling it automatically
  3. Writing and testing the function code
  4. Granting the function the IAM permissions it needs
  5. 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.

True or false

"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.

Download on the App StoreGet it on Google Play

More CLF-C02 topics in this module