AWS Certified Cloud Practitioner / Question #1421 of 719

Question #1421

A company needs to execute backend code for a web application without managing any servers or container infrastructure. Which AWS service should they use?

A

AWS Fargate

B

AWS Lambda

C

Amazon ECS

D

AWS Elastic Beanstalk

Explanation

AWS Lambda is the correct answer because it is a serverless compute service that runs code in response to events without requiring server or container management. Users only need to upload their code, and Lambda handles provisioning, scaling, and maintenance of the infrastructure.

Why other options are incorrect:
- A. AWS Fargate: While Fargate is serverless, it is designed for running containers (via ECS/EKS). The question specifies avoiding container infrastructure management.
- C. Amazon ECS: ECS is a container orchestration service that requires managing clusters and tasks, even if using Fargate. It does not eliminate container management.
- D. AWS Elastic Beanstalk: This service simplifies app deployment but still requires managing the underlying platform (e.g., EC2 instances or containers), making it less serverless than Lambda.

Key Point: Lambda is the only fully serverless option that abstracts all infrastructure management, focusing solely on code execution.

Answer

The correct answer is: B