Creating a cluster with an Auto Scaling group capacity provider - Amazon Elastic Container Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Creating a cluster with an Auto Scaling group capacity provider

When a new Amazon ECS cluster is created, you can specify one or more capacity providers to associate with the cluster. The associated capacity providers determine the infrastructure to run your tasks on.

For Amazon Web Services Management Console steps, see Creating a cluster using the classic console.

To create a cluster with an Auto Scaling group capacity provider (Amazon CLI)

Use the following command to create a new cluster and associate one or more capacity providers with it.

  • create-cluster (Amazon CLI)

    aws ecs create-cluster \ --cluster-name ASGCluster \ --capacity-providers CapacityProviderA CapacityProviderB \ --default-capacity-provider-strategy capacityProvider=CapacityProviderA,weight=1,base=1 capacityProvider=CapacityProviderB,weight=1 \ --region us-west-2

    If you prefer to use a JSON input file with the create-cluster command, use the following command to generate a CLI skeleton.

    aws ecs create-cluster --generate-cli-skeleton