Amazon ECS launch types - Amazon Elastic Container Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Amazon ECS launch types

The task definition launch type defines what capacity the task can run on, for example Amazon Fargate.

After you choose the launch type, Amazon ECS verifies that the task definition parameters you configure work with the launch type.

Fargate launch type

You can use the Fargate launch type to run your containerized applications without the need of provisioning and managing the underlying infrastructure. Amazon Fargate is the serverless way to host your Amazon ECS workloads.

The Fargate launch type is suitable for the following workloads:

  • Large workloads that require low operational overhead

  • Small workloads that have occasional burst

  • Tiny workloads

  • Batch workloads

For information about the Regions that support Fargate, see Supported Regions for Amazon ECS on Amazon Fargate.

The following diagram shows the general architecture.


                Architecture overview of Amazon ECS.

For more information about Amazon ECS on Fargate, see Amazon ECS on Amazon Fargate.

EC2 launch type

The EC2 launch type is suitable for large workloads that must be price optimized.

When considering how to model task definitions and services using the EC2 launch type, we recommend that you consider what processes must run together and how you might go about scaling each component.

As an example, suppose that an application consists of the following components:

  • A frontend service that displays information on a webpage

  • A backend service that provides APIs for the frontend service

  • A data store

For this example, create task definitions that group the containers that are used for a common purpose together. Separate the different components into multiple and separate task definitions. The following example cluster has three container instances that are running three front-end service containers, two backend service containers, and one data store service container.

You can group related containers in a task definition, such as linked containers that must be run together. For example, add a log streaming container to your front-end service and include it in the same task definition.

After you have your task definitions, you can create services from them to maintain the availability of your desired tasks. For more information, see Creating a service using the console. In your services, you can associate containers with Elastic Load Balancing load balancers. For more information, see Distribute Amazon ECS service traffic using load balancing. When your application requirements change, you can update your services to scale the number of desired tasks up or down. Or, you can update your services to deploy newer versions of the containers in your tasks. For more information, see Updating a service using the console.


                Application architecture example with three instances. Instance 1 has a
                    Front-end service container and a database service container. Instance 2 and
                    Instance 3 have a front-end service container and a back-end service
                    container.

External launch type

The External launch type is used to run your containerized applications on your on-premise server or virtual machine (VM) that you register to your Amazon ECS cluster and manage remotely. For more information, see External instances (Amazon ECS Anywhere).