Amazon EC2 Container Service
Developer Guide (API Version 2014-11-13)

Creating a Cluster

You can create a Amazon ECS cluster using the AWS Management Console, as described in this topic. Before you begin, be sure that you've completed the steps in Setting Up with Amazon ECS. After you've created your cluster, you can register container instances into it and run tasks and services.


This cluster creation wizard provides a simple way to create the resources that are needed by an ECS cluster, and it lets you customize several common cluster configuration options. However, this wizard does allow you to customize every resource option (for example, the container instance AMI ID). If your requirements extend beyond what is supported in this wizard, consider using our reference architecture at

Please do not attempt to modify the underlying resources directly once they are created by the wizard.

To create a cluster

  1. Open the Amazon ECS console at

  2. From the navigation bar, select the region to use.


    Amazon ECS is available in the following regions:

    Region Name Region
    US East (N. Virginia) us-east-1
    US East (Ohio) us-east-2
    US West (N. California) us-west-1
    US West (Oregon) us-west-2
    EU (Ireland) eu-west-1
    EU (London) eu-west-2
    EU (Frankfurt) eu-central-1
    Asia Pacific (Tokyo) ap-northeast-1
    Asia Pacific (Singapore) ap-southeast-1
    Asia Pacific (Sydney) ap-southeast-2
    Canada (Central) ca-central-1

  3. In the navigation pane, choose Clusters.

  4. On the Clusters page, select Create Cluster.

  5. For Cluster name, enter a name for your cluster. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.

  6. (Optional) To create an empty cluster with no associated container instances, select Create an empty cluster and choose Create to create your cluster and finish.


    If you create an empty cluster, you need to manually launch container instances into it before you can run tasks in the cluster. For more information, see Launching an Amazon ECS Container Instance.

  7. For EC2 instance type, choose the Amazon EC2 instance type for your container instances. The instance type that you select determines the resources available for your tasks to run on.

  8. For Number of instances, choose the number of Amazon EC2 instances to launch into your cluster. These instances are launched using the latest Amazon ECS-optimized AMI. For more information, see Amazon ECS-Optimized AMI.

  9. For EBS storage (GiB), choose the size of the Amazon EBS volume to use for data storage on your container instances. By default, the Amazon ECS-optimized AMI launches with an 8 GiB root volume and a 22 GiB data volume. You can increase the size of the data volume to allow for greater image and container storage.

  10. For Key pair, choose an Amazon EC2 key pair to use with your container instances for SSH access. If you do not specify a key pair, you cannot connect to your container instances with SSH. For more information, see Amazon EC2 Key Pairs in the Amazon EC2 User Guide for Linux Instances.

  11. In the Networking section, configure the VPC to launch your container instances into. By default, the cluster creation wizard creates a new VPC with two subnets in different Availability Zones, and a security group open to the Internet on port 80. This is a basic setup that works well for an HTTP service. However, you can modify these settings by following the substeps below.

    1. For VPC, choose to create a new VPC, or choose an existing VPC.

    2. (Optional) If you chose to create a new VPC, for CIDR Block, choose a CIDR block for your VPC. For more information, see Your VPC and Subnets in the Amazon VPC User Guide.

    3. For Subnets, choose the subnets to use for your VPC. If you chose to create a new VPC, you can keep the default settings or you can modify them to meet your needs. If you chose to use an existing VPC, select one or more subnets in that VPC to use for your cluster.

    4. For Security group, choose the security group to attach to the container instances in your cluster. If you choose to create a new security group, you can specify a CIDR block to allow inbound traffic from (the default is open to the Internet) and a single port or a range of contiguous ports to open on the container instance. For more complicated security group rules, you can choose an existing security group that you have already created.


      You can also choose to create a new security group and then modify the rules after the cluster is created. For more information, see Amazon EC2 Security Groups for Linux Instances in the Amazon EC2 User Guide for Linux Instances.

  12. In the Container instance IAM role section, choose the IAM role to use with your container instances. If your account has the ecsInstanceRole that is created for you in the console first run wizard, that is selected by default. If you do not have this role in your account, you can choose to create the role, or you can choose another IAM role to use with your container instances.


    If you do not launch your container instance with the proper IAM permissions, your Amazon ECS agent will not connect to your cluster. For more information, see Amazon ECS Container Instance IAM Role.

  13. Choose Create to create your cluster.