A patient portal must use shared file storage across Linux EC2 instances in multiple Availability Zones. The storage must remain available during an AZ failure. Which service should be used? The design must avoid adding custom operational scripts.
Trap 1: Instance store volumes
Instance store volumes are physically attached to a single EC2 host and have a lifespan tied to that instance; data is lost when the instance is stopped or terminated. They are local to one instance only, so other EC2 instances in different Availability Zones cannot access the same data. This ephemeral, single-instance nature makes it impossible to use instance store as shared file storage for a multi-instance patient portal.
Trap 2: An EBS volume attached to all instances
A standard EBS volume is a block-level storage device that can be attached to only one EC2 instance at a time, and it is zonal—confined to a single Availability Zone. While multi-attach EBS is available for specific io1/io2 volumes, it only works within the same AZ and requires a clustered file system, making it impractical for broad multi-AZ sharing. Attaching one EBS volume to all instances is not supported and would not provide the shared file storage the portal needs.
Trap 3: S3 mounted as a POSIX file system without a file gateway
S3 is an object storage service, not a file system, and it does not natively provide POSIX semantics such as file locking, in-place directory operations, or strong consistency for all operations. Tools like s3fs can mount S3 as a POSIX-like filesystem, but they rely on workarounds that introduce performance and consistency issues, and they require a gateway or third-party software. Without Amazon File Gateway, directly mounting S3 as a POSIX file system is not a reliable solution for shared file storage for multiple Linux EC2 instances.
- A
Instance store volumes
Why it fails: Instance store volumes are physically attached to a single EC2 host and have a lifespan tied to that instance; data is lost when the instance is stopped or terminated. They are local to one instance only, so other EC2 instances in different Availability Zones cannot access the same data. This ephemeral, single-instance nature makes it impossible to use instance store as shared file storage for a multi-instance patient portal.
- B
Amazon EFS with mount targets in multiple Availability Zones
Amazon EFS is a fully managed, regional NFS-based file system that supports the POSIX standard, making it ideal for Linux workloads. By creating mount targets in multiple Availability Zones, all EC2 instances can concurrently read and write the same files with low latency and high availability. EFS automatically scales capacity and is designed to be accessed by thousands of instances simultaneously, satisfying the shared file storage requirement across AZs.
- C
An EBS volume attached to all instances
Why it fails: A standard EBS volume is a block-level storage device that can be attached to only one EC2 instance at a time, and it is zonal—confined to a single Availability Zone. While multi-attach EBS is available for specific io1/io2 volumes, it only works within the same AZ and requires a clustered file system, making it impractical for broad multi-AZ sharing. Attaching one EBS volume to all instances is not supported and would not provide the shared file storage the portal needs.
- D
S3 mounted as a POSIX file system without a file gateway
Why it fails: S3 is an object storage service, not a file system, and it does not natively provide POSIX semantics such as file locking, in-place directory operations, or strong consistency for all operations. Tools like s3fs can mount S3 as a POSIX-like filesystem, but they rely on workarounds that introduce performance and consistency issues, and they require a gateway or third-party software. Without Amazon File Gateway, directly mounting S3 as a POSIX file system is not a reliable solution for shared file storage for multiple Linux EC2 instances.