Amazon ECS objects with Fargate are the same as for the EC2 launch type. An ECS cluster is the outermost encapsulation, and it consists of one or more services. A cluster could be distributed over multiple availability zones. A service is an implementation of a task definition, and runs one or more tasks. A task definition could have one or more task revisions. A task revision is a distinct task definition with a set of tasks and a service associated with it. One Fargate instance is associated with a set of tasks in a service. A task definition consists of zero or more container definitions. Typically, a task definition would be associated with one or more container definitions, and a task definition that does not consist of any container definition would not run any task containers. A diagram of ECS objects is shown as follows:
A Task definition is an application template and describes one or more containers. While some attributes or settings are configured at the task level, most of them are configured at the container level. Multiple revisions may be associated with a task definition.
A Service implements a task definition, and defines a desired count for tasks to run for a task definition. Optional features such as auto scaling and load balancing are configured in the service.
A Cluster in an ECS service is a grouping of one or more container services. A cluster name must be unique within an account. A cluster called default is provisioned by default.