Deploying Application to Amazon ECS Fargate

   Go back to the Task List

  « 6: Create Task Definition    8: Clean up »

7: Create Service

You configure service which is used to launch a task using the task definition created earlier.

  1. Goto the AWS Elastic Container Services (ECS) console and click on the Clusters menu in the left and then click on the dojofargatecluster link.

    Cloud9

  2. On the next screen, under the Services tab, click on the Create button.

    Cloud9

  3. On the next screen, select FARGETE for the launch type. Select dojofargatetask as the task definition. Select dojofargatecluster for the cluster. Type in dojofargateservice as the service name. Type in 1 for the number of tasks. Keep rest of the configuration to the default and click on the Next step button.

    Cloud9

  4. On the next screen, Select default VPC for the cluster VPC. Select one of the subnet. Select Enabled for Auto-assign public IP. Select None for load balancer type and click on the Next step button.

    Cloud9

  5. On the next screen, select Do not adjust the service’s desired count for service auto scaling and click on the Next step button.

    Cloud9

  6. On the next review screen, click on the Create service button. It will create the service. You can see the task running under the cluster. Click on the Tasks tab in the cluster to see the task running. Then click on the task id.

    Cloud9

  7. On the next screen, make note of the public IP.

    Cloud9

  8. Access the public IP address over http port like http://ipaddress using web browser. It will open the flask application web page.

    Cloud9

  9. This finishes the workshop. Follow the next step to clean-up the resources so that you don’t incur any cost post the workshop.