🟢
Amazon ECS – Data Volumes with Amazon EFS
- ECS can mount Amazon Elastic File System (EFS) volumes directly into containers.
- Supported on EC2 and Fargate launch types.
- EFS is regional and multi-AZ, so tasks in different AZs can share the same files.
Benefits
- Persistent storage even if tasks stop or restart.
- Shared access across multiple tasks and services.
- With Fargate + EFS, storage is fully serverless—no EC2 or file server management.
Common Use Cases
- Web applications serving files uploaded by users.
- Machine learning jobs sharing training datasets.
- Microservices that need to read/write to the same storage.
Notes
- Amazon S3 cannot be mounted as a native file system in ECS.
- Use Access Points for fine-grained permissions per task or service.