# Creating the Service

Once we have created a Cluster, we can create a service inside it.

## Configure Service

1. Choose a Launch Type. (In this case we will be using FARGATE).
2. Select a Task Definition and revision.
3. Select the platform version.
4. Select a cluster.
5. Create a name for the service.
6. Select the service type (in this case we will be using REPLICA).
7. Enter the number of tasks that the service should try to keep running.
8. Enter the desired value for the minimum and maximum healthy percent.

### Deployments

Select either the Rolling update or Blue/green deployment.

### Task Placement

Select a placement strategy from the placement templates.

## Configure network

### VPC and security groups

1. Select your Cluster VPC.
2. Select your desired subnets.
3. Attach security groups.&#x20;
4. Attach a Load Balancer

## Set Auto Scaling (optional)

Select Service Auto Scaling to set the cardinality of tasks and automatic task scaling policies.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devs.peerplays.com/tools-and-integrations/peerid/1.0.0/infrastructure/deployment-to-aws-ecs/creating-the-service.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
