Skip to Content

EBS Multi-Attach

Attaching one io1 or io2 volume to up to 16 instances in the same AZ, for clustered applications that manage shared writes.

What it is

Normally an EBS volume belongs to one instance. Multi-Attach attaches the same Provisioned IOPS volume (io1 or io2) to several EC2 instances in the same AZ at once. Each instance gets full read and write access to the high-performance volume.

It's built for clustered applications that coordinate their own writes, so that if one node fails, another already has the disk attached and takes over at once. Examples are Linux clusters such as Teradata, and Windows Server Failover Clusters.

How it works

Three instances in AZ 1 share one io2 volume with Multi-Attach; an instance in AZ 2 can't attach Three instances in AZ 1 share one io2 volume with Multi-Attach; an instance in AZ 2 can't attach

One volume, many instances, one AZ.
  • Turn on Multi-Attach when creating the volume (or later, while it's detached).
  • Attach it to up to 16 instances built on the Nitro System, all in the volume's AZ.
  • Every instance can read and write. EBS doesn't stop two instances writing the same blocks: the application must manage concurrent writes.
  • Use a cluster-aware file system (such as GFS2 or OCFS2). Ordinary file systems like XFS and EXT4 aren't designed for this, and will corrupt data if several instances mount them for writing.
  • Multi-Attach volumes can't be boot volumes, and there's no extra charge for the feature.

When not to use it

If the goal is only for many servers to share files, Multi-Attach is the wrong tool: use Amazon EFS (Linux) or FSx (Windows and others), which handle locking and work across AZs.

Exam tips

  • "Attach the same EBS volume to multiple instances" → Multi-Attach, io1/io2 only, same AZ, up to 16 instances.
  • "Clustered application needs shared block storage for high availability" → io2 with Multi-Attach.
  • "Many web servers share files across AZs" → EFS, not Multi-Attach.

Common traps

  • "Multi-Attach a gp3 volume." Only io1 and io2 support it.
  • "Multi-Attach across AZs." All instances must be in the volume's AZ.
  • "Format it with XFS and mount it on all instances." Needs a cluster-aware file system.

Hands-on lab: one volume, two instances

Goal: attach one io2 volume to two instances at the same time and see it on both.

Costs money

A 4 GiB io2 volume with 100 IOPS costs about $7 a month in total, prorated by the second: about a cent for an hour. Plus two t3.micro instances (about $0.04 an hour). Delete the volume as soon as you're done.

Launch two instances in one AZ

Launch two t3.micro instances (saa-ma-1, saa-ma-2, tag Project=saa-lab) in the same subnet, so they're in the same AZ. T3 instances are Nitro-based.

Create a Multi-Attach volume

Volumes → Create volume: type io2, size 4 GiB, IOPS 100, the same AZ, and tick Enable Multi-Attach. Tag Project=saa-lab.

Attach it twice

Actions → Attach volume to saa-ma-1, then again to saa-ma-2. The volume's Attached resources lists both instances.

See it on both

Connect to each instance and run lsblk: the same 4G disk appears on both. Don't create a normal file system and write from both; that's exactly what a cluster-aware file system is for.

Expected result: one EBS volume attached to two running instances.

Clean up: detach the volume from both instances, delete it, and terminate both instances.

AWS documentation

On this page

Open notes

Spotted a mistake?

These notes are open source. Suggest a fix, or star the repo if they helped you.

Suggest an edit

For AI agents: llms.txt · llms-full.txt