How can I multiattach EBS volumes to more than one EC2 instance?
Now you can do it with Provisioned IOPS io1 volumes.
AWS Announcement:
You can now enable Multi-Attach on Amazon EBS Provisioned IOPS io1 volumes to allow a single volume to be concurrently attached to up to sixteen AWS Nitro System-based Amazon Elastic Compute Cloud (Amazon EC2) instances within the same Availability Zone.
Note that it's necessary to use file systems designed for multi-writing or replication like GFS2 or OCFS2.
You cannot do this. The EC2 API does not allow for it.
If you want to do this, use Elastic File System (EFS) rather than Elastic Block Storage (EBS).
https://aws.amazon.com/efs/
Notes:
- It is much slower with small files
EBS is for a single instance only. Sharing an EBS instance would be like putting the same physical disk in two machines.
If you want two instances of the disk you can create an EBS snapshot or an AMI based on that EBS disk. This would let you run multiple instances of a web server, for example.
If you really want shared storage for data look at Amazon EFS, or you could use S3.