Menu
Amazon Elastic Compute Cloud
User Guide for Linux Instances

Placement Groups

A placement group is a logical grouping of instances within a single Availability Zone. Using placement groups enables applications to participate in a low-latency, 10 Gigabits per second (Gbps) network. Placement groups are recommended for applications that benefit from low network latency, high network throughput, or both. To provide the lowest latency, and the highest packet-per-second network performance for your placement group, choose an instance type that supports enhanced networking. For more information, see Enhanced Networking.

First, you create a placement group and then you launch multiple instances into the placement group. We recommend that you launch the number of instances that you need in the placement group in a single launch request and that you use the same instance type for all instances in the placement group. If you try to add more instances to the placement group later, or if you try to launch more than one instance type in the placement group, you increase your chances of getting an insufficient capacity error.

If you stop an instance in a placement group and then start it again, it still runs in the placement group. However, the start fails if there isn't enough capacity for the instance.

If you receive a capacity error when launching an instance in a placement group, stop and restart the instances in the placement group, and then try the launch again.

Placement Group Limitations

Placement groups have the following limitations:

  • A placement group can't span multiple Availability Zones.

  • The name you specify for a placement group must be unique within your AWS account.

  • The following are the only instance types that you can use when you launch an instance into a placement group:

    • General purpose: m4.large | m4.xlarge | m4.2xlarge | m4.4xlarge | m4.10xlarge

    • Compute optimized: c4.large | c4.xlarge | c4.2xlarge | c4.4xlarge | c4.8xlarge | c3.large | c3.xlarge | c3.2xlarge | c3.4xlarge | c3.8xlarge | cc2.8xlarge

    • Memory optimized: cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | x1.32xlarge

    • Storage optimized: d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | hi1.4xlarge | hs1.8xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge

    • GPU: cg1.4xlarge | g2.2xlarge | g2.8xlarge

  • Not all of the instance types that can be launched into a placement group can take full advantage of the 10 gigabit network speeds provided. Instance types that support 10 gigabit network speeds are listed in the Amazon EC2 Instance Types Matrix.

  • Although launching multiple instance types into a placement group is possible, this reduces the likelihood that the required capacity will be available for your launch to succeed. We recommend using the same instance type for all instances in a placement group.

  • You can't merge placement groups. Instead, you must terminate the instances in one placement group, and then relaunch those instances into the other placement group.

  • A placement group can span peered VPCs; however, you will not get full-bisection bandwidth between instances in peered VPCs. For more information about VPC peering connections, see VPC Peering in the Amazon VPC User Guide.

  • You can't move an existing instance into a placement group. You can create an AMI from your existing instance, and then launch a new instance from the AMI into a placement group.

  • Reserved instances provide a capacity reservation for EC2 instances in an Availability Zone. The capacity reservation can be used by instances in a placement group that are assigned to the same Availability Zone. However, it is not possible to explicitly reserve capacity for a placement group.

Launching Instances into a Placement Group

We suggest that you create an AMI specifically for the instances that you'll launch into a placement group.

To launch instances into a placement group using the console

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. Create an AMI for your instances.

    1. From the Amazon EC2 dashboard, choose Launch Instance. After you complete the wizard, choose Launch.

    2. Connect to your instance. (For more information, see Connect to Your Linux Instance.)

    3. Install software and applications on the instance, copy data, or attach additional Amazon EBS volumes.

    4. (Optional) If your instance type supports enhanced networking, ensure that this feature is enabled by following the procedures in Enhanced Networking on Linux.

    5. In the navigation pane, choose Instances, select your instance, choose Actions, Image, Create Image. Provide the information requested by the Create Image dialog box, and then choose Create Image.

    6. (Optional) You can terminate this instance if you have no further use for it.

  3. Create a placement group.

    1. In the navigation pane, choose Placement Groups.

    2. Choose Create Placement Group.

    3. In the Create Placement Group dialog box, provide a name for the placement group that is unique in the AWS account you're using, and then choose Create.

      When the status of the placement group is available, you can launch instances into the placement group.

  4. Launch instances into your placement group.

    1. In the navigation pane, choose Instances.

    2. Choose Launch Instance. Complete the wizard as directed, taking care to do the following:

      • On the Choose an Amazon Machine Image (AMI) page, select the My AMIs tab, and then select the AMI that you created.

      • On the Choose an Instance Type page, select an instance type that can be launched into a placement group.

      • On the Configure Instance Details page, enter the total number of instances that you'll need in this placement group, as you might not be able to add instances to the placement group later on.

      • On the Configure Instance Details page, select the placement group that you created from Placement group. If you do not see the Placement group list on this page, verify that you have selected an instance type that can be launched into a placement group, as this option is not available otherwise.

To launch instances into a placement group using the command line

  1. Create an AMI for your instances using one of the following commands:

  2. Create a placement group using one of the following commands:

  3. Launch instances into your placement group using one of the following options:

Deleting a Placement Group

You can delete a placement group if you need to replace it or no longer need a placement group. Before you can delete your placement group, you must terminate all instances that you launched into the placement group.

To delete a placement group using the console

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose Instances.

  3. Select and terminate all instances in the placement group. (You can verify that the instance is in a placement group before you terminate it by checking the value of Placement Group in the details pane.)

  4. In the navigation pane, choose Placement Groups.

  5. Select the placement group, and then choose Delete Placement Group.

  6. When prompted for confirmation, choose Yes, Delete.

To delete a placement group using the command line

You can use one of the following sets of commands. For more information about these command line interfaces, see Accessing Amazon EC2.