Skip to content
English
On this page

AWS File Storage Services

AWS offers Amazon Elastic File System (Amazon EFS) for file storage to enable you to share access to files that reside on the cloud.

Amazon Elastic File System

Amazon Elastic File System (Amazon EFS) provides scalable file storage and a standard file system interface for use with Amazon EC2. You can create an Amazon EFS file system, configure your instances to mount the file system, and then use an Amazon EFS file system as a common data source for workloads and application running on multiple instances. Amazon EFS can be mounted to multiple Amazon EC2 instances simultaneously, where it can continue to expand up to petabytes while providing low latency and high throughput.

Consider using Amazon EFS instead of Amazon S3 or Amazon EBS if you have an application (Amazon EC2 or on premises) or a use case that requires a fi le system and any of the following:

  • Multi-attach
  • GB/s throughput
  • Multi-AZ availability/durability

Automatic scaling (growing/shrinking of storage) Customers use Amazon EFS for the following use cases today:

  • Web serving
  • Database backups
  • Container storage
  • Home directories
  • Content management
  • Analytics
  • Media and entertainment workflows
  • Workflow management
  • Shared state management

Amazon EFS is not supported on Windows instances.

Creating your Amazon EFS File System

File System

The Amazon EFS file system is the primary resource in Amazon EFS, and it is where you store your fi les and directories. You can create up to 125 fi le systems per account.

Mount Target

To access your file system from within a VPC, create mount targets in the VPC. A mount target is a Network File System (NFS) endpoint within your VPC that includes an IP address and a DNS name, both of which you use in your mount command. A mount target is highly available, and it is illustrated in Figure.

Mount Target

Accessing an Amazon EFS File System

There are several different ways that you can access an Amazon EFS fi le system, including using Amazon EC2 and AWS Direct Connect.

Using Amazon Elastic Compute Cloud

To access a file system from an Amazon Elastic Compute Cloud (Amazon EC2) instance, you must mount the file system by using the standard Linux mount command, as shown in Figure. The file system will then appear as a local set of directories and files. An NFS v4.1 client is standard on Amazon Linux AMI distributions.

Mount Target

In your command, specify the file system type (nfs4), the version (4.1), the file system DNS name or IP address, and the user’s target directory. A file system belongs to a region, and your Amazon EFS file system spans all Availability Zones in that region. Once you have mounted your file system, data can be accessed from any Availability Zone in the region within your VPC while maintaining full consistency.

Using AWS Direct Connect

You can also mount your on-premises servers to Amazon EFS in your Amazon VPC using AWS Direct Connect. With AWS Direct Connect, you can mount your on-premises servers to Amazon EFS using the same mount command used to mount in Amazon EC2. The figure shows how to use AWS Direct Connect with Amazon EFS.

Using Amazon EFS

using_direct_connect

Using AWS Direct Connect with Amazon EFS

using_direct_connect

Customers can use Amazon EFS combined with AWS Direct Connect for migration, bursting, or backup and disaster recovery.

Syncing Files Using AWS DataSync

Now that you have a functioning Amazon EFS file system, you can use AWS DataSync to synchronize files from an existing file system to Amazon EFS. AWS DataSync can synchronize your file data and also file system metadata such as ownership, time stamps, and access permissions. To do this, download and deploy a sync agent from the Amazon EFS console as either a virtual machine (VM) image or an AMI. Next, create a sync tack and configure your source and destination file systems. Then start your task to begin syncing the files and monitor the progress of the file sync using Amazon CloudWatch.

Performance

Amazon EFS is designed for a wide spectrum of performance needs, including the following:

  • High throughput and parallel I/O
  • Low latency and serial I/O

To support those two sets of workloads, Amazon EFS offers two different performance modes, as described here:

General purpose (default) General-purpose mode is the default mode, and it is used for latency-sensitive applications and general-purpose workloads, offering the lowest latencies for file operations. While there is a trade-off of limiting operations to 7,000 per second, general-purpose mode is the best choice for most workloads.

Max I/O If you are running large-scale and data-heavy applications, then choose the max I/O performance option, which provides you with a virtually unlimited ability to scale out throughput and IOPS, but with a trade-off of slightly higher latencies. Use max I/O when you have 10 or more instances accessing your file system concurrently

I/O Performance Options

ModeWhat’s It For?AdvantagesTrade-OffsWhen to Use
General purpose (default)Latency-sensitive applications and general-purpose workloadsLowest latencies for file operationsLimit of 7,000 ops/secBest choice for most workloads
Max I/OLarge-scale and data-heavy applicationsVirtually unlimited ability to scale out throughput/ IOPSSlightly higher latenciesConsider if 10 (or more) instances are accessing your file system concurrently

If you are not sure which mode is best for your usage pattern, use the PercentIOLimit Amazon CloudWatch metric to determine whether you are constrained by general-purpose mode. If you are regularly hitting the 7,000 IOPS limit in general-purpose mode, then you will likely benefit from max I/O performance mode. As discussed with the CAP theorem earlier in this study guide, there are differences in both performance and trade-off decisions when you’re designing systems that use Amazon EFS and Amazon EBS. The distributed architecture of Amazon EFS results in a small increase in latency for each operation, as the data that you are storing gets pushed across multiple servers in multiple Availability Zones. Amazon EBS can provide lower latency than Amazon EFS, but at the cost of some durability. With Amazon EBS, you provision the size of the device, and if you reach its maximum limit, you must increase its size or add more volumes, whereas Amazon EFS scales automatically. The table shows the various performance and other characteristics for Amazon EFS as related to Amazon EBS Provisioned IOPS.

Amazon EBS Performance Relative to Amazon EFS

Amazon EFSAmazon EBS Provisioned IOPS
PerformancePer-operation latencyLow, consistentLowest, consistent
Throughput scaleMultiple GBs per secondSingle GB per second
CharacteristicsData availability/durabilityStored redundantly across multiple Availability ZonesStored redundantly in a single Availability Zone
Access1 to 1000s of EC2 instances, from multiple Availability Zones, concurrentlySingle Amazon EC2 instance in a single Availability Zone
Use casesBig Data and analytics, media processing workflows, content management, web serving, home directoriesBoot volumes, transactional and NoSQL databases, data warehousing, ETL

Security

You can implement security in multiple layers with Amazon EFS by controlling the following:

  • Network traffic to and from file systems (mount targets) using the following:
    • VPC security groups
    • Network ACLs
  • File and directory access by using POSIX permissions
  • Administrative access (API access) to file systems by using IAM. Amazon EFS supports:
    • Action-level permissions
    • Resource-level permissions

Familiarize yourself with the Amazon EFS product, details, and FAQ pages. Some exam questions may be answered by components from those pages.