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.
So image definitions is kind of a veeery short analogue of task definitions? Am I right?
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?
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: