Getting Started with Amazon Elastic Container Service

   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 dojocluster link.

    Cloud9

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

    Cloud9

  3. On the next screen, select EC2 for the launch type. Select dojotask as the task definition. Select dojocluster for the cluster. Type in dojoservice as the service name. Select REPLICA as the service type. Select 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 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, click on the EC2 instance id link.

    Cloud9

  8. It will open the instance details on a new browser window or tab. Select the instance and make note of the public IPv4 address.

    Cloud9

  9. Access the IP address over http port like http://ipaddress. It will open the flask application web page.

    Cloud9

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