Amazon Elastic File System (EFS)
A fully managed, scalable, cloud-native NFS file system for AWS workloads.
What is Amazon EFS?
Amazon Elastic File System (Amazon EFS) is a fully managed, serverless, elastic Network File System (NFS) that provides scalable file storage for use with AWS Cloud services and on-premises resources. EFS is designed to be highly available and durable, automatically growing and shrinking as you add and remove files, so your applications have the storage they need, when they need it.
EFS supports thousands of concurrent connections and can be mounted on multiple Amazon EC2 instances, containers (ECS/EKS), Lambda functions, and even on-premises servers. It is ideal for use cases such as content management, web serving, data analytics, application development, and backup solutions. With its pay-as-you-go pricing and seamless integration with AWS Identity and Access Management (IAM), EFS simplifies file storage management in the cloud.
Architecture
Key Components
File System
The core resource in EFS, providing a scalable, elastic NFS file system that can be mounted by multiple clients simultaneously.
Mount Targets
Network endpoints in your VPC that allow EC2 instances and other resources to connect to your EFS file system securely.
Access Points
Managed entry points that simplify access management by providing application-specific entry paths and permissions.
Key Capabilities
Elastic Scalability
Automatically scales storage up or down as you add or remove files, with no disruption or manual intervention.
Secure and Compliant
Supports encryption at rest and in transit, integrates with IAM, and meets compliance standards for sensitive workloads.
Multi-AZ Availability
Provides high availability and durability by replicating data across multiple Availability Zones within a region.
Common Use Cases
Implementation Example
# Terraform Example: Create EFS and Mount Target
resource "aws_efs_file_system" "example" {
creation_token = "example-token"
lifecycle_policy {
transition_to_ia = "AFTER_30_DAYS"
}
throughput_mode = "bursting"
}
resource "aws_efs_mount_target" "example" {
file_system_id = aws_efs_file_system.example.id
subnet_id = aws_subnet.example.id
security_groups = [aws_security_group.example.id]
}
This Terraform configuration creates an Amazon EFS file system with a lifecycle policy to transition files to Infrequent Access after 30 days, and sets up a mount target in a specified subnet and security group. You can then mount the EFS file system on your EC2 instances or containers.
Related Topics
Test Your Knowledge
Score 8/10 or higher to pass
You need to be logged in to take this quiz.
Login to Continue