A volume belongs to one instance. When several servers need the same files, such as the uploads every web server must see, use EFS (Elastic File System): a file system many instances mount at once, across the zones of a region.
There is no size to choose: it grows and shrinks with the files, billed per gigabyte stored.
Creating one
FS=$(aws efs create-file-system --creation-token market-share --tags Key=Name,Value=market-share --query FileSystemId --output text)--creation-token is any unique string; asking twice with the same token returns the same file system instead of a second one. It is creating for a few seconds, then available:
aws efs describe-file-systems --query "FileSystems[].[FileSystemId,Name,LifeCycleState]" --output tableMount targets
Instances reach the file system through a mount target: an address in a subnet, one per zone that has instances.
aws efs create-mount-target --file-system-id $FS --subnet-id $SUBNET --security-groups $SG$SUBNET is a subnet in the zone, $SG the security group the mount target gets. Repeat for each zone.
aws efs describe-mount-targets --file-system-id $FS --query "MountTargets[].[AvailabilityZoneName,LifeCycleState]" --output tableEach target is creating, then available. The next lesson mounts the file system on two instances.