Creating an ECS service
We have created an ECS cluster and configured an ECS task definition that includes a single container running Nginx with an appropriate port mapping configuration to expose the Nginx web server to the outside world.
We now need to define an ECS service, which will configure ECS to deploy one or more instances of our ECS task definition to our ECS cluster. ECS services deploy a given ECS task definition to a given ECS cluster, allowing you to configure how many instances (ECS tasks) of the referenced ECS task definition you would like to run, and controlling more advanced features, such as load balancer integration and rolling updates of your application.
To create a new ECS service, complete the following steps:
- In the ECS console, select
Clusters
from the left and click on the test-cluster you created earlier in this chapter:
Selecting an ECS Cluster to Create an ECS Service
- In the
Cluster
details page, select the Services tab and click on Create to create a new service...