Enable Multi-Attach for an Amazon EBS volume
Multi-Attach enabled volumes can be managed in much the same way that you would manage
any other Amazon EBS volume. However, in order to use the Multi-Attach functionality, you must
enable it for the volume. When you create a new volume, Multi-Attach is disabled by default.
After you create a Multi-Attach enabled volume, you can attach it to an instance in the
same way that you attach any other EBS volume. For more information, see Attach an Amazon EBS volume to an Amazon EC2 instance.
You can enable Multi-Attach during volume creation. Use one of the following methods.
- Console
-
To enable Multi-Attach during volume creation
-
Open the Amazon EC2 console at
https://console.aws.amazon.com/ec2/.
-
In the navigation pane, choose Volumes.
-
Choose Create volume.
-
For Volume type, choose Provisioned IOPS SSD
(io1
) or Provisioned IOPS SSD (io2
).
-
For Size and IOPS, choose the
required volume size and the number of IOPS to provision.
-
For Availability Zone, choose the same Availability Zone
that the instances are in.
-
For Amazon EBS Multi-Attach, choose Enable
Multi-Attach.
-
(Optional) For Snapshot ID, choose the snapshot from which to create
the volume.
-
Set the encryption status for the volume.
If the selected snapshot is encrypted, or if your account is enabled for encryption by default, then encryption is automatically
enabled and you can't disable it. You can choose the KMS key to use to encrypt the
volume.
If the selected snapshot is unencrypted and your account is not enabled for encryption
by default, encryption is optional. To encrypt the volume, for Encryption,
choose Encrypt this volume and then select the KMS key to use to
encrypt the volume.
You can attach encrypted volumes only to instances that support Amazon EBS encryption. For
more information, see Amazon EBS encryption.
-
(Optional) To assign custom tags to the volume, in the Tags
section, choose Add tag, and then enter a tag key and value pair. .
-
Choose Create volume.
- Command line
-
To enable Multi-Attach during volume creation
Use the create-volume
command and specify the --multi-attach-enabled
parameter.
$
C:\>
aws ec2 create-volume --volume-type io2 --multi-attach-enabled --size 100
--iops 2000
--region us-west-2
--availability-zone us-west-2b
You can also enable Multi-Attach for io2
volumes after creation, but only if they
are not attached to any instances.
You can't enable Multi-Attach for io1
volumes after creation.
Use one of the following methods to enable Multi-Attach for an io2
volume after creation.
- Console
-
To enable Multi-Attach after creation
-
Open the Amazon EC2 console at
https://console.aws.amazon.com/ec2/.
-
In the navigation pane, choose Volumes.
-
Select the volume and choose Actions,
Modify volume.
-
For Amazon EBS Multi-Attach, choose Enable
Multi-Attach.
-
Choose Modify.
- Command line
-
To enable Multi-Attach after creation
Use the modify-volume
command and specify the --multi-attach-enabled
parameter.
$
C:\>
aws ec2 modify-volume --volume-id vol-1234567890abcdef0
--multi-attach-enabled