A task definition contains parameters needed to run Docker containers on Amazon ECS. For example, the docker image and the amount of resources allocated to execute the container are some of the parameters defined in the task definition. In addition, each task definition supports multiple containers.
Click here to learn more about ECS Task Definitions.
Using the AWS Console, search for
Start the task definition wizard by clicking on
Create New Task Definition
Fargate and click on
ECS can also be deployed to EC2 instances, click here to learn more.
Fill in the
Task Definition Name field with
Keep scrolling down - Select 0.5GB for
Task Memory (GB) and 0.25vCPU for
Task CPU vCPU
Let’s create your container - click on
awsbuilders-task-container for the container name and paste the
Image URI copied from the AWS ECR console to fill in the
image field. Don’t forget to add
:latest to the end of the URI.
Before clicking on
Add, set the
Port mappings to 80 TCP
After creating the container, click on
create to finalize the task definition wizard.