INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

Topic lessonTopic: Containers, ECS and Fargate

AWS Fargate explained: ECS, responsibilities and launch requirements

Fargate lets AWS provision and maintain the server infrastructure running your containers. With ECS, distinguish management of what and how many tasks to run from the Fargate compute option. Less host management does not remove application, IAM, networking or data responsibilities.

What you will learn

Distinguish ECS and Fargate by role, and separate managed infrastructure from conditions you still need to configure and verify.

Prerequisite

An image is a stored artifact, a task executes its definition, and a service maintains a desired task count. This lesson covers Fargate with ECS, not EKS-specific execution conditions. It does not launch paid resources.

ECS manages execution; Fargate provides compute

ECS and Fargate: management and execution relationships, not the user traffic path
ECS and Fargate: management and execution relationships, not the user traffic path1: ECS service — Schedule and replace toward desired count — ECS task. 2: ECS task — Run on the chosen compute — Fargate compute12ECS serviceECS taskFargate computeECS and Fargate: management and execution relationships, not the user traffic path1: ECS service — Schedule and replace toward desired count — ECS task. 2: ECS task — Run on the chosen compute — Fargate compute12ECS serviceECS taskFargate compute
  1. ECS service → ECS taskSchedule and replace toward desired count
  2. ECS task → Fargate computeRun on the chosen compute
ECS service
Configure revision and desired count
ECS task
Execute the application from its definition
Fargate compute
AWS provisions and maintains compute
ECS is not tied to one compute option
OptionInfrastructure responsibilityConditions to review
FargateAWS provisions and maintains task infrastructure.Supported platforms, sizes, networking and features.
Customer-managed EC2Customer manages EC2 configuration, patching and capacity.Required control, maintenance, placement and resources.
ECS Managed InstancesAWS manages EC2 infrastructure provisioning, patching and scaling.Supported features, capacity providers and costs.

Serverless does not mean physical servers disappear. Here it describes the customer not individually provisioning and maintaining execution hosts. Choosing Fargate also does not turn the application into an event-driven Lambda function.

Managed compute still leaves application responsibilities

Who manages what with Fargate
SubjectResponsibility
Compute infrastructure and hostsFargate provisions and patches the infrastructure.
Container images and applicationsCustomer reviews content, dependencies, updates and behavior.
IAM and secretsCustomer configures task/execution roles and secret delivery.
Networking and dataCustomer designs VPC connectivity, controls, routing, encryption and retention.

AWS documents a hardware-virtualized isolation environment for each Fargate task, without sharing its underlying kernel and related resources with other tasks. This is a layer outside ordinary Linux process-container isolation. It does not automatically fix overbroad IAM, unintended exposure or application vulnerabilities.

Align artifact, size, permissions and connectivity before launch

Launch conditions for Fargate on ECS
CheckWhat to examine
Image and runtime platformMatch image OS and architecture to supported Linux/Windows and X86_64/ARM64 conditions.
Task CPU / memorySupported Fargate combinations and platform requirements.
Task / execution rolesSeparate application APIs from agent image retrieval and logging.
awsvpc networkingTask network interface, subnet, security groups and routes.
Storage and healthTemporary/durable data, logs, checks and user-facing responses.

awsvpc gives a task its network interface. Selecting a subnet alone does not establish access to a private ECR image. Verify DNS, paths, controls and permissions for required services. Compare appropriate NAT or VPC endpoint options instead of exposing every task by default.

Separate provisioned size, measurements and cost

Configured CPU and memory are not measurements of constant application usage. After selecting a valid size, examine throughput, latency, memory pressure and concurrency. Changing task size and changing service task count are separate operations.

Fargate compute is not the entire bill
Cost factorConditions to review
Fargate executionProvisioned resources, duration, OS/CPU, Region and purchase option.
Supporting servicesLogs, image storage, load balancers, NAT, transfer and durable storage.
After stopping computeStorage and remaining-resource charges need separate review.

Pricing duration runs from the start of image download until task termination. Per-second billing still has a one-minute minimum for Linux and a five-minute minimum for Windows. Do not estimate it using only seconds spent processing application requests.

This lesson promises neither a fixed price nor free use. Align Region, OS, duration, size and supporting resources before consulting current pricing. Serverless alone does not establish lower cost.

Practise identifying the remaining responsibilities

Choose an option to see the result and explanation.

Who reviews application dependency updates after moving to Fargate?
Read the answer and reason

Answer: The customer manages image and application updates · Fargate manages the infrastructure side; content and permissions still need review.

A subnet is configured for a Fargate task. Is private ECR retrieval established?
Read the answer and reason

Answer: Verify required connectivity and execution-role conditions · Subnet selection alone does not establish required paths or API permissions.

How are Fargate and ECS related?
Read the answer and reason

Answer: Fargate is a compute option for ECS-managed execution · Separate what/how many to run from the compute that runs it.

What should you inspect after stopping the tasks?
Read the answer and reason

Answer: Review remaining storage, logs, NAT and other related charges · Stopping compute is not the same as removing all supporting resources.

Check, then explain in your own words

  1. Separate ECS management from Fargate compute in the diagram.
  2. Explain the five launch-review areas in your own words.
  3. Distinguish supported size from measurements/cost, then study CPU and memory.
Check your understanding: What four areas still need customer review with Fargate?

Images/applications, permissions/secrets, networking, and data/health.

Managed hosts reduce infrastructure maintenance, while application content, access and user-facing behavior remain separate duties.

Sources and conditions checked

The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.