A company is designing a new application that will run on Amazon ECS with Fargate. The application must be able to read and write files to a shared file system that is accessible from multiple tasks simultaneously. The file system must be durable and support NFS protocol. Which storage solution should be used?
Amazon EFS is a fully managed NFS file system that can be mounted by multiple ECS tasks across multiple AZs, providing a shared file system.
Why this answer
Amazon EFS is the correct choice because it provides a fully managed, durable, NFS-based (Network File System) shared file system that can be mounted concurrently by multiple Amazon ECS tasks running on Fargate. EFS supports the NFSv4.1 and NFSv4.0 protocols, ensuring simultaneous read/write access across tasks, and its data is replicated across multiple Availability Zones for durability.
Exam trap
The trap here is that candidates often confuse Amazon EBS Multi-Attach with a shared file system, but EBS Multi-Attach is block-level storage limited to a single AZ and incompatible with Fargate, whereas EFS is a fully managed NFS file system designed for multi-task, multi-AZ access.
How to eliminate wrong answers
Option A (Amazon EBS with Multi-Attach) is wrong because EBS Multi-Attach only supports a maximum of 16 Nitro-based EC2 instances in a single Availability Zone, and it does not support Fargate tasks, which are serverless and cannot attach EBS volumes directly. Option C (Amazon S3) is wrong because S3 is an object storage service that does not support the NFS protocol; it uses RESTful APIs (HTTP/HTTPS) and is not a POSIX-compliant file system mountable via NFS. Option D (Amazon FSx for Lustre) is wrong because FSx for Lustre is designed for high-performance computing (HPC) workloads with a POSIX-compliant file system but does not natively support the NFS protocol; it uses the Lustre client protocol instead.