Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Containers Running on ECS and AWS Fargate Can Now Use Amazon Elastic File System

Containers Running on ECS and AWS Fargate Can Now Use Amazon Elastic File System

This item in japanese

Amazon Elastic File System (EFS) provides a simple, scalable, elastic, fully-managed shared file system. Recently, Amazon announced that Amazon Elastic Container Service (ECS) tasks running on both Amazon Elastic Compute Cloud (EC2) and AWS Fargate are now able to use EFS.

Earlier, customers who built applications that required data persistence or shared storage could face challenges when hosting containers. By their nature containers are ephemeral; they are dynamically created and removed, and any local data is lost when they are terminated. However, now Amazon provides a way to mitigate this challenge when hosting containers on ECS by launching support for EFS file systems. Both containers running on ECS and AWS Fargate will be able to use EFS.

Martin Beeby, a principal advocate for Amazon Web Services, stated in a blog post:

This new capability will help customers containerize applications that require shared storage such as content management systems, internal DevOps tools, and machine learning frameworks. A whole new set of workloads will now enjoy the benefits containers bring, enabling customers to speed up their deployment process, optimize their infrastructure utilization, and build more resilient systems.

With EFS, customers can store their data separate from their compute. Moreover, since it is a regional service, it stores data within and across three Availability Zones for high availability and durability. Already customers could access EFS-based data if their containers were also running on a cluster of EC2 instances – and Amazon has now expanded that capability for ECS. Also, the public cloud vendor migrated it to AWS Fargate, a serverless compute engine for containers that work with both ECS and EKS.

To use EFS with ECS or Fargate, customers can add one or more volume definitions to a task definition using the ECS console. The volume definition contains an EFS file system ID, Access Point ID, and options to enable IAM authorization or TLS encryption in transit. 


Furthermore, users can specify the container definitions within the task definition. In essence, when a task that uses an EFS filesystem runs, ECS or Fargate will ensure that the EFS file system is mounted and available for the containers that need access to it.

Customers highly anticipated the EFS support as Ian McKay, DevOps lead at Kablamo, stated in a tweet:

This has probably got to be one of the most requested features I hear from customers with container workloads. Time to refactor out some dirty hacks.

However, some are worried about performance as a respondent in a Hacker News thread wrote: 

I see a lot of notes about EFS's performance in the comments. I figured it's at least worth noting, for anyone considering using ECS with EFS, that just last week EFS had its read throughput on its general-purpose tier increased by 400%. That probably won't solve all EFS performance issues, but it's a pretty big boost and a nice announcement to come alongside ECS support.

Lastly, Amazon ECS support for EFS is available in all regions where ECS and EFS are available at no additional costs. Furthermore, the public roadmap for AWS container services (ECS, ECR, Fargate, and EKS) is available on GitHub.

Rate this Article