2

Right here I can read that:

You can also create pipelines that build and deploy container-based applications by using Amazon ECS as the deployment provider. Before you create a pipeline that deploys container-based applications with Amazon ECS, you must prepare an image definitions file.

  1. So image definitions is kind of a veeery short analogue of task definitions? Am I right?

  2. How ECS uses only 2 key-value pairs to deploy containers to a cluster? How does it know how much CPU, Memory to reserve for this container or other details?

Ruslan Plastun
  • 1,985
  • 3
  • 21
  • 48

1 Answers1

4

You usually configure ECS using task definitions which are containing all necessary attributes to run container tasks (for instance, one or more images, computing resources, exposed ports etc.). If you decide to deploy with CodePipeline, image definition files just substitute the task definition's "image" attributes.

According to your questions:

  1. Image definitions are just a kind of "substitution policies" for existing task definitions.
  2. ECS uses task definitions. They contain all relevant data and not only two key-value pairs.
Joe Eig
  • 353
  • 2
  • 7
  • Wait, let's say I choose to deploy with "myService" service that uses some task definition that has TWO container definitions inside of it connected, and each of them has it's own "image" attribute. Then which of this existing image attributes is supstituted by the new image definition defined in CodePipeline? – Ruslan Plastun Aug 04 '18 at 04:55
  • 1
    Every ECS task definition can have one or more images. Each image is identified by a `name`. CodePipeline's image definition consists of a list of objects containing the `name` and the desired `imageUri` meant to be changed. – Joe Eig Aug 04 '18 at 08:07