guijob
guijob

Reputation: 4488

AWS ECS: Why I must set Task Definition twice?

I'm learning AWS ECS and I'm with some doubts about how it works.

Why I must set a Task Definition for a Cluster and for each Service inside a Cluster?

Upvotes: 0

Views: 302

Answers (1)

Thomas B.
Thomas B.

Reputation: 169

You don't. A Task Definition is a description of one or several containers, such as which docker image to use, which ports to open and what data volumes to use. The task definition itself is not related to any specific cluster.

A Service defines the desired number of instances (tasks) of a specific task definition that you want ECS to run and maintain in a specific Cluster.

Upvotes: 1

Related Questions