AWS Certified CloudOps Engineer Associate SOA-C03 [2026]

Amazon ECS Launch Types: EC2, Fargate, and External

Compare Amazon ECS EC2, Fargate, and external launch types, including infrastructure responsibility, pricing units, storage integration, image registries, and operational tradeoffs.

AWS Certified CloudOps Engineer Associate SOA-C03 [2026]AWS Certified CloudOps Engineer Associate SOA-C03 [2026]Updated Sep 1, 2026
Study options
WatchComing later
ListenComing later
ReadAvailable
ReviewComing later

Study guide

Technical reference and lesson notes

Amazon ECS Launch Types: EC2, Fargate, and External

Purpose of This Lesson

Amazon ECS supports multiple launch types that determine where container workloads run and who manages the underlying infrastructure. The key assessment skill is recognizing the operational tradeoff between EC2 control, Fargate serverless simplicity, and external infrastructure for on-premises or virtual-machine environments.

Key Concepts

EC2 launch type

With the EC2 launch type, you provision and manage a pool of Amazon EC2 instances that forms the ECS cluster. These instances are visible in the EC2 console and serve as the infrastructure on which containers run.

You are responsible for:

  • Provisioning the instances
  • Patching and upgrading the instances
  • Maintaining the instance pool
  • Optimizing cluster capacity and scaling
  • Managing the infrastructure configuration

EC2 launch type charges are based on the running EC2 instances rather than directly on individual containers. This model provides more granular control over the infrastructure and supports both Amazon EFS file systems and Amazon EBS block volumes for container workloads.

Container images can be pulled from Amazon ECR, Docker Hub, or a self-hosted image repository.

Fargate launch type

AWS Fargate runs ECS tasks without requiring you to provision or manage the underlying EC2 infrastructure. AWS handles the infrastructure layer and its scaling, making Fargate a serverless container execution option.

With Fargate:

  • You do not manage the underlying servers.
  • AWS handles the infrastructure required to run tasks.
  • Cluster-capacity optimization is not your responsibility.
  • Charges are based on running tasks rather than the underlying EC2 instances.
  • Amazon EFS can be connected to tasks.
  • EBS block-volume integration is not available in the described Fargate model.
  • Infrastructure-level control is more limited than with EC2.
  • Images can be pulled from Amazon ECR or Docker Hub.

Fargate trades infrastructure control for reduced operational responsibility.

External launch type

The external launch type runs ECS containers on infrastructure outside AWS, such as on-premises servers or virtual machines. This capability is associated with Amazon ECS Anywhere. It is useful when workloads must remain on existing external infrastructure while still being managed through ECS.

Launch-Type Comparison

ConsiderationEC2FargateExternal
Where containers runA managed pool of AWS EC2 instancesAWS-managed serverless infrastructureOn-premises servers or virtual machines
Who manages the infrastructureCustomerAWSCustomer or external infrastructure operator
Primary charging unit describedRunning EC2 instancesRunning tasksExternal infrastructure costs apply outside the ECS launch-type comparison
Cluster optimizationCustomer responsibilityHandled by AWSDepends on the external environment
Infrastructure controlHigh and granularLimitedDepends on the external infrastructure
EFS supportYesYesNot specified in this lesson
EBS block-volume integrationYesNo, as described hereNot specified in this lesson
Image sources describedECR, Docker Hub, self-hosted repositoryECR or Docker HubNot specified in this lesson

Exam- or Assessment-Relevant Takeaways

  • Choose EC2 when the scenario emphasizes granular infrastructure control, EBS block volumes, support for a self-hosted image repository, or an existing requirement to manage the EC2 pool.
  • Choose Fargate when the scenario emphasizes serverless container execution, avoiding server patching and upgrades, or letting AWS manage the underlying capacity.
  • Do not confuse Fargate with having no infrastructure at all. The infrastructure still exists; AWS manages it for you.
  • For EC2, remember that the customer remains responsible for instance patching, upgrades, and cluster optimization.
  • Fargate provides EFS connectivity but does not provide the EBS block-volume integration described for EC2.
  • If containers must run on on-premises servers or virtual machines, evaluate the external launch type through Amazon ECS Anywhere.
  • Pay attention to the charging unit in a scenario: EC2 is described as charging per running instance, while Fargate is described as charging for running tasks.
  • Image registry options differ: EC2 supports ECR, Docker Hub, and self-hosted repositories; Fargate supports ECR and Docker Hub in this lesson.

Tool / Feature Decision Guide

Choose EC2 when control is the deciding factor

Use the EC2 launch type when the workload or organization needs direct control over the compute layer. This is especially relevant when EBS block volumes, self-hosted image registries, custom instance management, or deliberate cluster-capacity optimization are important.

The tradeoff is operational overhead: the team must maintain, patch, upgrade, and scale the EC2 instances.

Choose Fargate when operational simplicity is the deciding factor

Use Fargate when the goal is to run containers without provisioning or maintaining the underlying servers. Fargate is a strong fit when the team wants AWS to manage infrastructure scaling and does not require granular infrastructure configuration.

The tradeoff is reduced control, no EBS block-volume integration as described here, and fewer image registry choices than EC2.

Choose external when placement outside AWS is required

Use the external launch type when containers need to run on on-premises servers or virtual machines while being run through ECS. Amazon ECS Anywhere is the relevant service context.

Common Traps / Misconceptions

  • Fargate is not the same as having no servers. It is serverless from the customer’s operational perspective because AWS manages the underlying infrastructure.
  • ECS launch type is not the same as image registry. EC2 and Fargate describe where tasks run; ECR and Docker Hub describe possible image sources.
  • Fargate does not provide the same storage options as EC2 in this lesson. EFS is supported, but EBS block-volume integration is not described as available for Fargate.
  • EC2 does not charge per container in the stated model. The relevant unit is the running EC2 instance.
  • Fargate does not eliminate all configuration decisions. It reduces infrastructure management and provides less infrastructure-level control; it does not remove the need to configure and operate ECS tasks.
  • External does not mean another AWS compute option. It refers to running containers on external servers or virtual machines, including on-premises infrastructure.
  • Automatic Fargate scaling does not mean every application behavior is automatically optimized. The lesson’s distinction is that AWS manages the underlying infrastructure and cluster-capacity concerns, while the customer still selects and operates the ECS workload configuration.

Real-World Engineer / Analyst Notes

Start launch-type selection by identifying who must own the infrastructure lifecycle. If the answer must be the application team or platform team, EC2 may be appropriate; if that responsibility should be delegated to AWS, Fargate is the simpler option.

Storage requirements can be an early decision filter. A requirement for EBS block volumes points toward EC2 in the choices covered here, while shared file storage through EFS is compatible with both EC2 and Fargate.

Also verify the image supply chain early. A self-hosted repository is described as an EC2 option, whereas the Fargate choices in this lesson are Amazon ECR and Docker Hub.

Finally, do not evaluate only the infrastructure price. EC2 may offer more direct control but also creates patching, upgrading, capacity, and optimization work. Fargate may reduce those tasks while limiting infrastructure customization.

Quick Reference Summary

  • EC2: Customer provisions and manages EC2 instances; charged per running instance; supports EFS and EBS; provides granular infrastructure control; supports ECR, Docker Hub, and self-hosted repositories.
  • Fargate: AWS manages the underlying infrastructure; charged for running tasks; supports EFS but not EBS block-volume integration as described; offers less infrastructure control; supports ECR and Docker Hub.
  • External: Runs ECS containers on on-premises servers or virtual machines through the external launch type and Amazon ECS Anywhere.
  • Primary decision: EC2 favors control and broader infrastructure options; Fargate favors serverless operations and reduced management; external favors placement on existing non-AWS infrastructure.

Flashcards

Q: A team wants ECS containers but does not want to provision, patch, or upgrade EC2 instances. Which launch type best fits?

A: Choose Fargate because AWS manages the underlying infrastructure and the customer does not manage an EC2 instance pool.

Q: A workload specifically requires EBS block-volume integration. Which launch type should be considered from this lesson?

A: The EC2 launch type, because EBS block-volume integration is available there, while it is not available for Fargate as described.

Q: When is EC2 preferable to Fargate despite the additional maintenance burden?

A: EC2 is preferable when granular infrastructure control, EBS integration, or a self-hosted image repository is important.

Q: How does the charging unit differ between the EC2 and Fargate launch types in this lesson?

A: EC2 charges per running instance, whereas Fargate charges for running tasks rather than the underlying infrastructure.

Q: A company must run ECS containers on its own on-premises virtual machines. Which launch type and service context apply?

A: Use the external launch type with Amazon ECS Anywhere to run containers on on-premises servers or virtual machines.

Q: Which image sources are described for EC2 but not for Fargate?

A: EC2 can use a self-hosted image repository in addition to Amazon ECR and Docker Hub. Fargate is described with ECR and Docker Hub only.

Q: What does “serverless” mean in the context of Fargate here?

A: It means AWS provisions and manages the underlying infrastructure required to run the containers, so the customer does not manage the servers directly.

Q: What cluster-capacity responsibility remains with an EC2 launch-type customer?

A: The customer must optimize the cluster and ensure that the EC2 instance pool is configured to scale appropriately.

Q: A team needs shared file storage but does not need block storage. Which storage integration can work with either EC2 or Fargate?

A: Amazon EFS can be connected to containers or tasks in both launch types described.

Q: What is the main infrastructure-control tradeoff between EC2 and Fargate?

A: EC2 provides more granular control because the customer manages the instances. Fargate reduces infrastructure responsibility but provides less control over how that infrastructure is configured.

Q: Who handles instance patching and upgrades for an EC2 launch-type cluster?

A: The customer does. Managing, patching, and upgrading the EC2 instances is part of the EC2 launch-type responsibility.

Q: A scenario says AWS should automatically handle the infrastructure needed for containers. Which launch type is the strongest match?

A: Fargate, because it automatically provisions and manages the backend infrastructure required to run ECS tasks.

Practice Questions

Question 1

A platform team needs to run ECS tasks using EBS block volumes and a private, self-hosted container image repository. Which launch type best matches the stated requirements?

A. Fargate
B. EC2
C. External only
D. Fargate with ECS Anywhere

Correct answer: B. EC2

Explanation: The lesson associates EC2 with EBS integration and self-hosted image repositories. Fargate is limited to ECR or Docker Hub in the described options and does not provide the stated EBS integration.

Question 2

An organization wants to run containers without managing the underlying servers, including their patching, upgrades, and capacity optimization. Which option should the organization select?

A. EC2 launch type
B. Fargate launch type
C. External launch type on company-owned servers
D. EC2 launch type with a self-hosted registry

Correct answer: B. Fargate launch type

Explanation: Fargate is the serverless option in which AWS manages the underlying infrastructure and the customer avoids managing an EC2 instance pool.

Question 3

A business must keep its container workloads on on-premises virtual machines but wants to run them through Amazon ECS. Which choice is most appropriate?

A. Fargate
B. EC2 launch type
C. External launch type with Amazon ECS Anywhere
D. ECR launch type

Correct answer: C. External launch type with Amazon ECS Anywhere

Explanation: The external launch type is intended for containers running on on-premises servers or virtual machines.

Question 4

An architect is comparing two designs. Design X gives the team direct control over the compute instances but requires patching and cluster optimization. Design Y delegates the underlying infrastructure to AWS but offers less infrastructure control. Which pairing is correct?

A. X is Fargate; Y is EC2
B. X is EC2; Y is Fargate
C. X is External; Y is EC2
D. X is ECR; Y is Fargate

Correct answer: B. X is EC2; Y is Fargate

Explanation: EC2 provides granular infrastructure control but requires instance and cluster management. Fargate delegates the infrastructure layer to AWS and reduces that operational burden.

WordPress Metadata

Suggested Slug:
amazon-ecs-launch-types-ec2-fargate-external

Meta Description:
Compare Amazon ECS EC2, Fargate, and external launch types, including infrastructure responsibility, pricing units, storage integration, image registries, and operational tradeoffs.

Tags:
Amazon ECS, ECS launch types, AWS Fargate, Amazon EC2, ECS Anywhere, container orchestration, ECR, Docker Hub, EFS, EBS, AWS Certified CloudOps Engineer, cloud automation