Posted On: Apr 24, 2020

Amazon Elastic Container Service (ECS) tasks running on both Amazon Elastic Compute Cloud (EC2) and Amazon Fargate can now mount Amazon Elastic Filesystem (EFS) filesystems. ECS tasks using EFS will automatically mount the filesystems specified by the customer in the task definition and make the available to the containers in the task across all availability zones in the region. This enables persistent, shared storage to be defined and used at the task and container level in ECS. 

Applications like Wordpress, Drupal, and JIRA use EFS to store user data and application state, with active/standby container pairs running in different availability zones for high availability. Data science teams use EFS to store shared training data and home directories, allowing notebook containers and distributed training jobs to access the data in parallel. 

To use EFS with ECS, customers can add one or more volume definitions to an ECS task definition. A volume definition includes an EFS file system ID, Access Point ID, and whether to enable IAM authorization or TLS encryption in transit. Container definitions within the task definition can specify the task definition volumes that should be mounted when that container is run. When a task that uses an EFS filesystem runs, ECS ensures that the EFS file system is mounted and available to the containers that need access to it.  

Amazon ECS support for EFS is available in the Amazon Web Services China (Beijing) Region, operated by Sinnet, and the Amazon Web Services China (Ningxia) Region, operated by NWCD. To get started, view our documentation.