Search code examples
amazon-web-servicesamazon-ecs

What are ECS Image definitions files?


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?


Solution

  • 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.