Amazon EBS volume limits for Amazon EC2 instances - Amazon Elastic Compute Cloud

Amazon EBS volume limits for Amazon EC2 instances

The maximum number of Amazon EBS volumes that you can attach to an instance depends on the instance type and instance size. When considering how many volumes to attach to your instance, you should consider whether you need increased I/O bandwidth or increased storage capacity.

Bandwidth versus capacity

For consistent and predictable bandwidth use cases, use Amazon EBS-optimized instances with General Purpose SSD volumes or Provisioned IOPS SSD volumes. For maximum performance, match the IOPS you have provisioned for your volumes with the bandwidth available for your instance type.

For RAID configurations, you might find that arrays larger than 8 volumes have diminished performance returns due to increased I/O overhead. Test your individual application performance and tune it as required.

Volume limits for instances built on the Nitro System

The volume limits for instances built on the Nitro System depend on the instance type. Some Nitro instance types have a dedicated EBS volume limit, while most have a shared volume limit.

For more information, see Nitro-based instances.

Dedicated EBS volume limit

The following Nitro instance types have a dedicated EBS volume limit that varies depending on instance size. The limit is not shared with other device attachments. In other words, you can attach any number of EBS volumes up to the volume attachment limit, regardless of the number of attached devices, such as NVMe instance store volumes and network interfaces.

  • General purpose: M7a | M7i | M7i-flex | M8g

  • Compute optimized: C7a | C7i | C7i-flex | C8g

  • Memory optimized: R7a | R7i | R7iz | R8g | U7i | X8g

  • Accelerated computing: G6 | G6e | Gr6

For these instance types that support dedicated volume limits, the volume limits depend on the instance size. The following table shows the limit for each instance size.

Instance size Volume limit
medium | large | xlarge | 2xlarge | 4xlarge | 8xlarge | 12xlarge 32
16xlarge 48
24xlarge 64
32xlarge 88
48xlarge 128
metal-16xl | metal-24xl 39
metal-32xl | metal-48xl 79

Shared EBS volume limit

All other Nitro instance types (not listed in Dedicated EBS volume limit) have a volume attachment limit that is shared between Amazon EBS volumes, network interfaces, and NVMe instance store volumes. You can attach any number of Amazon EBS volumes up to that limit, less the number of attached network interfaces and NVMe instance store volumes. Keep in mind that every instance must have at least one network interface, and that NVMe instance store volumes are automatically attached at launch.

Most Nitro instances support a maximum of 28 attachments. The following examples demonstrate how to calculate how many EBS volumes you can attach.

Examples
  • With an m5.xlarge instance with only the primary network interface, you can attach 27 EBS volumes.

    28 volumes - 1 network interface = 27

  • With an m5.xlarge instance with two additional network interfaces, you can attach 25 EBS volumes.

    28 volumes - 3 network interfaces = 25

  • With an m5d.xlarge instance with two additional network interfaces, you can attach 24 EBS volumes.

    28 volumes - 3 network interfaces - 1 NVMe instance store volume = 24

The following are the exceptions for instance types that have shared volume limits.

Exceptions
  • d3.8xlarge and d3en.12xlarge instances support a maximum of 3 EBS volumes.

  • DL2q instances support a maximum of 19 EBS volumes.

  • g5.48xlarge instances support a maximum of 9 EBS volumes.

  • inf1.xlarge and inf1.2xlarge instances support a maximum of 26 EBS volumes.

  • inf1.6xlarge instances support a maximum of 23 EBS volumes.

  • inf1.24xlarge instances support a maximum of 11 EBS volumes.

  • Mac2, Mac2-m2, Mac2-m2pro, and Mac2-m1ultra instances support a maximum of 10 EBS volumes.

  • U-*tb1 virtualized instances support a maximum of 27 EBS volumes.

  • For vt1.3xlarge and vt1.6xlarge instances, each accelerator counts as two attachments.

  • For vt1.24xlarge instances, the accelerators do not count toward the shared volume limit.

  • For accelerated computing instances other than VT1 instances, each accelerator counts as an attachment. For example, p4d.24xlarge instances have a shared volume limit of 28, 8 GPUs, and 8 NVMe instance store volumes. This means that you can attach up to 11 EBS volumes (28 volumes - 1 network interface - 8 GPUs - 8 NVMe instance store volumes).

  • Most bare metal instances support a maximum of 31 EBS volumes. The following are the exceptions:

    • mac1.metal instances support a maximum of 16 EBS volumes.

    • U-*tb1 bare metal instances support a maximum of 19 EBS volumes.

Volume limits for Xen-based instances

The volume limits for Xen-based instances, such as T2, depend on the operating system.

For more information, see Xen-based instances.

Linux instances

Attaching more than 40 volumes to a Xen-based Linux instance can cause boot failures. This number includes the root volume, plus any attached instance store volumes and Amazon EBS volumes.

If you experience boot problems on an instance with a large number of volumes, stop the instance, detach any volumes that are not essential to the boot process, start the instance, and then reattach the volumes after the instance is running.

Important

Attaching more than 40 volumes to a Xen-based Linux instance is supported on a best effort basis only and is not guaranteed.

Windows instances

The following table shows the volume limits for Xen-based Windows instances based on the driver used. That these numbers include the root volume, plus any attached instance store volumes and Amazon EBS volumes.

Driver Volume Limit

AWS PV

26

Citrix PV

26

Red Hat PV

17

We recommend that you do not that attach more than 26 volumes to a Xen-based Windows instance with AWS PV or Citrix PV drivers, as it is likely to cause performance issues. To determine which PV drivers your instance is using, or to upgrade your Windows instance from Red Hat to Citrix PV drivers, see Upgrade PV drivers on EC2 Windows instances.

Important

Attaching more than the following number of volumes to a Xen-based Windows instance is supported on a best effort basis only and is not guaranteed.

For more information about how device names are related to volumes, see How volumes are attached and mapped for Amazon EC2 Windows instances.