Understanding a task definition
As mentioned in Chapter 3, Amazon ECS – Overview, a task definition is a JSON file format that works as a blueprint for your application. First, you select the launch type compatibility (Fargate, ECS, or External, which is ECS Anywhere). Next, you set what operation system family (Windows or Linux) the task definition belongs to. Finally, you need to set the task size, the amount of vCPU, and the memory (GB) the containers inside the task can consume from the container instance.
The next step within a task definition is called the container definition, in which you set how the container will behave, such as the container image name, ports to be exposed, vCPU, memory limits (MiB) to be consumed, health checks, storage, and logging. A task definition is immutable, and it can’t be edited once created. Therefore, if any parameter needs to be changed, a new task revision must be created.
When working with Windows-based task definitions...