Creating an Amazon ECS cluster for the External launch type
You create a cluster to define the infrastructure your tasks and services run on.
Before you begin, be sure that you've completed the steps in Set up to use Amazon ECS and assign the appropriate IAM permission. For more information, see Amazon ECS cluster examples. The Amazon ECS console provides a simple way to create the resources that are needed by an Amazon ECS cluster by creating a Amazon CloudFormation stack.
To make the cluster creation process as easy as possible, the console has default selections for many choices which we describe below. There are also help panels available for most of the sections in the console which provide further context.
-
Creates a default namespace in Amazon Cloud Map that is the same name as the cluster. A namespace allows services that you create in the cluster to connect to the other services in the namespace without additional configuration.
For more information, see Interconnect Amazon ECS services.
You can modify the following options:
-
Change the default namespace associated with the cluster.
A namespace allows services that you create in the cluster can connect to the other services in the namespace without additional configuration. The default namespace is the same as the cluster name. For more information, see Interconnect Amazon ECS services.
-
Configure the cluster for external instances
-
Turn on Container Insights.
CloudWatch Container Insights collects, aggregates, and summarizes metrics and logs from your containerized applications and microservices. Container Insights also provides diagnostic information, such as container restart failures, that you use to isolate issues and resolve them quickly. For more information, see Monitor Amazon ECS containers using Container Insights.
-
Add tags to help you identify your cluster.
To create a new cluster (Amazon ECS console)
Open the console at https://console.amazonaws.cn/ecs/v2
. -
From the navigation bar, select the Region to use.
-
In the navigation pane, choose Clusters.
-
On the Clusters page, choose Create cluster.
-
Under Cluster configuration, configure the following:
-
For Cluster name, enter a unique name.
The name can contain up to 255 letters (uppercase and lowercase), numbers, and hyphens.
-
(Optional) To have the namespace used for Service Connect be different from the cluster name, for Namespace, enter a unique name.
-
-
Expand Infrastructure, select Amazon Fargate (serverless).
-
(Optional) To turn on Container Insights, expand Monitoring, and then turn on Use Container Insights.
-
(Optional) To help identify your cluster, expand Tags, and then configure your tags.
[Add a tag] Choose Add tag and do the following:
-
For Key, enter the key name.
-
For Value, enter the key value.
-
-
Choose Create.
Next steps
You must register the instances with the cluster. For more information, see Registering an external instance to an Amazon ECS cluster.
After you create the cluster, you can create task definitions for your applications and then run them as standalone tasks, or as part of a service. For more information, see the following: