Fargate
AWS Fargate
Mechanism for running containers without managing EC2.
In one sentence
Mechanism for running containers without managing EC2.
Overview
AWS Fargate is a compute engine that removes the need for server management when running containers on ECS or EKS.
Common use cases
- Running ECS containers
- API operations with reduced server management
- Batch container processing
CLF-C02 exam points
- Container execution platform
- No EC2 instance management required
- Used in combination with ECS or EKS
SAA-C03 exam points
- Specify CPU and memory at the container level
- Estimate cost for always-on APIs
- Suited for longer-running or container-dependent workloads that don't fit Lambda
Practical Use
AWS Fargate is a "serverless" compute engine for running containers on Amazon ECS and Amazon EKS. With traditional ECS / EKS, users had to launch and manage EC2 instances as container hosts, but with Fargate, users no longer need to be aware of the EC2 instances that run the containers. When you specify vCPU, memory, and network settings in the task definition (or Pod definition), AWS automatically provisions the capacity and launches the containers. OS patching, host management, and capacity reservation become unnecessary, significantly reducing the operational burden. The main differences between Fargate and the EC2 launch type lie in the billing model and the scope of management. The EC2 launch type charges per instance per unit of time, and idle capacity is also billed. Fargate charges per task based on vCPU, memory, and execution time, so charges are incurred only for what is needed per container. The cost tends to be lower than the EC2 launch type when resource utilization is high, and higher when it is low. SAA-C03 asks about which Fargate is suited for among patterns such as "always-on API", "short-running batch", and "irregular processing", and how to choose between Fargate and the EC2 launch type. Typical use cases include serverless container execution for web APIs, short-running batch jobs triggered by CI/CD pipelines, machine learning inference container execution, and one-off execution of third-party images (OSS tools). The differentiation from Lambda lies in the constraints: Lambda has a maximum execution time of 15 minutes and per-function limits, while Fargate's strength is its ability to handle long-running processes and arbitrary container images. In the exam context, CLF-C02 asks questions such as "which service runs containers without managing EC2?" and tests whether you confuse the relationships among ECS / EKS / Fargate.
Official Documentation
Cost notes
- Billed by vCPU, memory, and execution time
- Not needed for static-site MVPs
Security notes
- Separate the task role and the execution role
- Do not include secrets in container images
Related services
Related comparison articles
Related comparison articles have not been added for this term yet.
Related architecture diagrams
Related architecture diagrams have not been added for this term yet.
Tags
Last updated: 2026-06-07
Previous term
Amazon EventBridge
Next term
Amazon FSx