Deploying Application to Amazon ECS Fargate

   Go back to the Task List

  « 5: Launch Fargate Cluster    7: Create Service »

6: Create Task Definition

You create task definition which is used to run the docker image as a task on the ECS Fargate cluster.

  1. Goto the AWS Elastic Container Services (ECS) console and click on the Task Definitions menu in the left and then click on the Create new Task Definition button.

    Cloud9

  2. On the next screen, select FARGATE option and click on the Next step button.

    Cloud9

  3. On the next screen, type in dojofargatetask as the task name. Select None for the task role.

    Cloud9

  4. On the same screen, select Create new role option for the task execution role. Select 0.5GB for the task memory and 0.25CPU for the task CPU. Click on the Add container button.

    Cloud9

  5. On the add container popup, type in dojofargatecontainer as the container name. Copy-paste docker image URI in the Image field. Type in 128 for the memory soft limit. Type in 80 for the container port. Keep tcp for the protocol and click on the Add button.

    Cloud9

  6. The container gets added to the task definition. Finally, click on the Create button to create the task definition.

    Cloud9

  7. The task definition is created in no time. In the next step, you configure service for the ECS Fargate cluster.