AWS Storage Blog
AWS re:Invent recap: Modernize your applications with Amazon EFS
Development teams are modernizing their applications by adopting containers, serverless, and microservices-based architectures. As containers are transient in nature, long-running applications can benefit from keeping state in durable file storage. At the same time, serverless computing enables you to be more agile while spending less time dealing with the security, scalability, and availability of your applications. Whether containerized or serverless, your modern data-intensive applications require fast access to shared data.
AWS re:Invent 2020-2021 is in full gear, and application modernization is a hot topic. In this blog, I interview Will Ochandarena, Principal Product Manager, Amazon EFS. Will is an expert in application modernization, and he delivered two re:Invent breakout sessions I recommend you check out (available on-demand):
Jeff Tougas, Senior Principal Software Engineer at Asurion, was the featured guest in Will’s first session. Jeff offered a useful first-hand account of how the Amazon EFS solutions Will covered helped Asurion modernize their applications. In the second session, Will’s featured guest was Jake Farrell, Senior Director of Engineering at Acquia. Jake shared how Acquia containerized, dynamically scaled, and modernized their hosting environment using Amazon EFS.
Interview with Will Ochandarena, Principal Product Manager, Amazon EFS
In my interview with Will, I asked him for a run down on the basics of application modernization, then asked him to get more specific around use cases, how to get started, and best practices.
Will, what are the basics for application modernization?
The customers that I work with who are modernizing their applications with Amazon EFS fall into one of two categories: application migration and application augmentation. With migration, customers either update their build processes to build container images with their existing applications, or update their applications to run in a function-based compute environment like AWS Lambda. With augmentation, rather than migrate their existing applications over, they develop a microservice with a new piece of functionality that can access shared data or state with their existing application. In both cases, customers typically take this opportunity to migrate off of self-managed storage and databases to serverless AWS services like Amazon EFS and Amazon Aurora.
How do I know if I need a shared file system for my containerized or serverless applications?
If you are migrating an existing application, you may already leverage a shared file system to manage shared access to data from multiple different applications, or multiple parallel instances of an application. Even if your application doesn’t need shared access to data, you may want your application data to be persisted across multiple AWS Availability Zones. Having that persisted data allows your application to fail over anywhere in a Region. In both of these cases, it makes sense to persist your data to Amazon EFS.
How do I get started with Amazon EFS for Amazon Elastic Container Service (Amazon ECS)?
First, create your file system from the Amazon EFS console, and optionally create an access point for your application. Next, create a new task in the Amazon ECS console, first configuring your file system as a volume in the volumes section, and then referencing that volume in your container configuration. Last, launch your task in the same VPC as your file system. You can read a full tutorial in our documentation, and see a demo at this link.
How do I get started with Amazon EFS for Amazon Elastic Kubernetes Service (Amazon EKS)?
First, create your file system from the Amazon EFS console, and optionally create an access point for your application. Next, configure a storage class and one or more persistent volumes that reference your file system. You can then claim those volumes and connect them to your pods. For a full tutorial, see our documentation.
How do I get started with AWS Lambda and Amazon EFS?
First, create a file system and an access point from the Amazon EFS console. Next, using the AWS Lambda console, create a new function. Configure the function to use the same VPC as your Amazon EFS file system, and then select your file system and access point and specify the mount point. Now, any files that you write under the mount point will be written to Amazon EFS. See this blog for a full tutorial.
What best practices do you recommend for developers building applications with containers and serverless that require a persistent data layer?
First, enable Amazon EFS Infrequent Access (Amazon EFS IA) to optimize your storage costs, and achieve $0.08 /GB-month blended storage pricing or lower.* Next, enable AWS Backup to take periodic backups of your file system so you can recover from accidental deletion of files, or even your whole file system. For security, use AWS Identity and Access Management (AWS IAM) policies to authorize access between your applications and your file system. Amazon EFS Access Points can also help you to enforce identity and authorization requirements for files and directories. Last, monitor your file system throughput and burst credits to make sure you are getting the best performance.
The AWS serverless and containers ecosystems use Amazon EFS for persistent file storage to support development and DevOps efforts to integrate microservice-based applications, distributed applications like machine learning training, and web serving. Whether you’re using AWS Lambda, Amazon ECS, Amazon EKS, or completely managed containers with AWS Fargate, Amazon EFS is the natural fit your modern applications in the AWS Cloud.
Hear more from Will on the modern applications topic by tuning in for his two re:Invent breakout sessions (STG310 – STG312). In them, he shares more of his thoughts, and together with Amazon EFS customers, shares use cases leveraging AWS containers and serverless with Amazon EFS.
Meanwhile, keep on modernizing your applications, and enjoy AWS re:Invent 2020-2021.
*pricing in US East (N. Virginia) Region, assumes 80% of your storage in Amazon EFS IA