liveBook · Manning

AWS Fargate

As explained in Amazon Web Services in Action, Third Edition: An in-depth guide to AWS

AWS Fargate is a serverless compute engine for running containers without managing the underlying servers.

AWS Fargate is a fully managed compute layer for running containers without maintaining the underlying EC2 instances. It works with Amazon ECS and Amazon EKS: you configure CPU and memory for each task rather than selecting an EC2 instance type. section 18.4 section 18.6

With ECS, a cluster organizes resources, a task definition describes containers, a task runs that definition, and a service keeps the desired number of tasks running. Fargate supplies the compute capacity beneath those tasks. section 18.4 section 18.6

A practical Fargate deployment typically combines these components:

  • Use an Application Load Balancer to distribute requests among running containers. section 18.5

Running a web application

A Notea deployment uses React and Next.js, stores data in S3, and runs its containers through ECS and Fargate. CloudFormation provisions the infrastructure, while the task definition specifies the image, port, logs, environment variables, and task role. The task role grants the container selected S3 object and bucket permissions. A service starts two tasks behind an Application Load Balancer and can scale them according to CPU load. section 18.5

Fargate trades infrastructure management for task-based pricing. Billing runs every second from image download until task termination; CPU and memory rates vary by region and architecture. EC2 can be cheaper for raw resources, but self-managed scaling may add fragmentation, overprovisioning, and operational work. section 18.4

How Amazon Web Services in Action, Third Edition: An in-depth guide to AWS covers it

How deep it goes
Explains task sizing, billing, ECS integration, service scaling, and deployment configuration, while deferring container-image fundamentals.
Examples
Demonstrates Notea as a React and Next.js application deployed behind an Application Load Balancer with S3 storage.
What it assumes
Assumes basic container, S3, and load-balancing knowledge while introducing ECS cluster, task, task definition, and service terminology.
What you can do after
Operate/configure a containerized web application with ECS, Fargate, CloudFormation, load balancing, IAM, and CPU-based autoscaling.
How it connects
Connects container tasks with ECS, EKS, EC2, Application Load Balancer, S3, CloudFormation, IAM, and autoscaling.

Also explained in

Compare how 2 books explain AWS Fargate →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Amazon Web Services in Action, Third Edition: An in-depth guide to AWS. The section links point to the parts of the book it draws on.