Compute Beyond EC2: Serverless & Containers

Lambda, Fargate, ECS/EKS, Elastic Beanstalk, and Lightsail — matching modern compute options to scenarios.

10 min read

EC2 gives you full control — and full responsibility. AWS offers a spectrum of compute services that trade control for convenience. The exam tests whether you can place a scenario on that spectrum.

Serverless compute

AWS Lambda

Run code without any servers: upload a function, it runs in response to events (S3 uploads, API calls, schedules). Pay per request + compute milliseconds. Max 15 minutes per invocation.

AWS Fargate

Serverless containers: runs your ECS/EKS containers without you managing any EC2 hosts.

Think of it like this

Lambda is a vending machine: it sits idle costing you nothing, springs to life when someone presses a button, does its one job, and goes dormant. You never think about the electricity or restocking staff — that's AWS's problem.

Containers

Amazon ECS (Elastic Container Service)

AWS's own container orchestrator — simple way to run Docker containers at scale.

Amazon EKS (Elastic Kubernetes Service)

Managed Kubernetes — choose it when the scenario explicitly says Kubernetes or needs portability to other clouds.

Amazon ECR (Elastic Container Registry)

Stores and versions your container images.

Tip

Both ECS and EKS can run on EC2 (you manage hosts) or Fargate (serverless). The word "Kubernetes" → EKS; otherwise container questions usually point to ECS or Fargate.

Simplified platforms

AWS Elastic Beanstalk

PaaS: upload your code, Beanstalk provisions and manages EC2, load balancing, scaling, and monitoring. You keep visibility into the resources.

Amazon Lightsail

Beginner-friendly bundles (VPS, storage, DNS) at flat monthly pricing — for simple websites and blogs, minimal AWS knowledge required.

AWS Batch

Runs large-scale batch computing jobs, provisioning optimal compute automatically.

AWS Outposts / Local Zones / Wavelength

Run AWS compute on-premises, in metro areas, or inside 5G networks for latency or residency needs.

Exam tip

Scenario mapping: "run code only when events occur, no servers" → Lambda. "Docker without managing servers" → Fargate. "just deploy my web app quickly, but keep control of resources" → Elastic Beanstalk. "simple website, predictable monthly price, new to AWS" → Lightsail.

Knowledge check
Question 1 of 4

A company wants to run code in response to file uploads, paying only for execution time and managing no servers. Which service fits?