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.
Distinguish ECS and Fargate by role, and separate managed infrastructure from conditions you still need to configure and verify.
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 service → ECS taskSchedule and replace toward desired count
- 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
| Option | Infrastructure responsibility | Conditions to review |
|---|---|---|
| Fargate | AWS provisions and maintains task infrastructure. | Supported platforms, sizes, networking and features. |
| Customer-managed EC2 | Customer manages EC2 configuration, patching and capacity. | Required control, maintenance, placement and resources. |
| ECS Managed Instances | AWS 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
| Subject | Responsibility |
|---|---|
| Compute infrastructure and hosts | Fargate provisions and patches the infrastructure. |
| Container images and applications | Customer reviews content, dependencies, updates and behavior. |
| IAM and secrets | Customer configures task/execution roles and secret delivery. |
| Networking and data | Customer 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
| Check | What to examine |
|---|---|
| Image and runtime platform | Match image OS and architecture to supported Linux/Windows and X86_64/ARM64 conditions. |
| Task CPU / memory | Supported Fargate combinations and platform requirements. |
| Task / execution roles | Separate application APIs from agent image retrieval and logging. |
| awsvpc networking | Task network interface, subnet, security groups and routes. |
| Storage and health | Temporary/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.
| Cost factor | Conditions to review |
|---|---|
| Fargate execution | Provisioned resources, duration, OS/CPU, Region and purchase option. |
| Supporting services | Logs, image storage, load balancers, NAT, transfer and durable storage. |
| After stopping compute | Storage 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.
Check, then explain in your own words
- Separate ECS management from Fargate compute in the diagram.
- Explain the five launch-review areas in your own words.
- 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.
- Amazon ECS servicesChecked:
Scope and conditionsDesired-count maintenance, replacement and throttled retries; no immediate-success or HTTP-health guarantee. Documentation review, not live AWS verification.
Used in this lessonECS manages execution; Fargate provides compute Separate provisioned size, measurements and cost
- Amazon ECS clustersChecked:
Scope and conditionsLogical grouping versus compute; current Fargate, EC2 and Managed Instances options. Documentation review, not live AWS verification.
Used in this lessonECS manages execution; Fargate provides compute Practise identifying the remaining responsibilities
- Amazon ECS task IAM roleChecked:
Scope and conditionsApplication AWS API permissions; separate reachability and isolation conditions. Documentation review, not live AWS verification.
Used in this lessonManaged compute still leaves application responsibilities Align artifact, size, permissions and connectivity before launch
Scope and conditionsAgent permissions for image retrieval and logging versus the application task role. Documentation review, not live AWS verification.
Used in this lessonManaged compute still leaves application responsibilities Align artifact, size, permissions and connectivity before launch Practise identifying the remaining responsibilities
Scope and conditionsAwsvpc, platform and task-setting conditions; no unconditional reuse of EC2 settings. Documentation review, not live AWS verification.
Used in this lessonAlign artifact, size, permissions and connectivity before launch
Scope and conditionsTask versus container settings, units and Windows runtime-enforcement differences. Documentation review, not live AWS verification.
Used in this lessonAlign artifact, size, permissions and connectivity before launch Separate provisioned size, measurements and cost
- AWS Fargate pricingChecked:
Scope and conditionsProvisioned resources, duration and platform conditions; separate surrounding charges and avoid fixed-price promises. Documentation review, not live AWS verification.
Used in this lessonSeparate provisioned size, measurements and cost Practise identifying the remaining responsibilities