Amazon EFS (Elastic File System)
7 questions foundWhat is Amazon EFS and how is it different from Amazon S3 or EBS?
Beginner Amazon EFS is a fully managed, elastic network file system that can be mounted concurrently by multiple EC2 instances at the same time, automatically growing and shrinking as you add or remove files, unlike Amazon EBS which attaches to only one EC2 instance at a time, and unlike Amazon S3 which is an object storage service rather than a traditional file system with folders and file locking behavior.
sudo mount -t efs fs-12345678:/ /mnt/efs
Real-world example A content management system running on multiple EC2 instances behind a load balancer uses EFS so every instance can read and write to the exact same shared set of uploaded files simultaneously.
Common follow-ups: Can EFS be mounted from instances in different Availability Zones?;What is the difference between EFS and FSx?
S3 & Storage;EC2 & Compute
What are the different storage classes available in EFS?
Beginner EFS offers Standard storage for frequently accessed files, Infrequent Access storage which costs less but has a small retrieval fee for files not accessed often, and within each of these, One Zone options that store data in a single Availability Zone at a lower cost compared to the Standard multi Availability Zone options, letting you balance cost against durability requirements.
aws efs put-lifecycle-configuration --file-system-id fs-12345678 --lifecycle-policies '[{"TransitionToIA":"AFTER_30_DAYS"}]'
Real-world example A media company configures a lifecycle policy that automatically moves files untouched for thirty days into EFS Infrequent Access storage, significantly reducing its overall storage costs for older, rarely accessed project files.
Common follow-ups: How does EFS lifecycle management decide when to move files between storage classes?;What is the cost difference between Standard and One Zone storage classes?
S3 & Storage;AWS Cost Management & Billing
How do EFS mount targets work across multiple Availability Zones?
Intermediate An EFS mount target is a network endpoint created within a specific subnet and Availability Zone that EC2 instances use to connect to the file system, and by creating a mount target in each Availability Zone of your VPC, you ensure that instances in any zone can access the same shared file system with low latency, even providing resilience if one Availability Zone experiences issues.
aws efs create-mount-target --file-system-id fs-12345678 --subnet-id subnet-0123abcd --security-groups sg-0123abcd
Real-world example A company running its application across three Availability Zones for high availability creates an EFS mount target in each zone, ensuring every instance can access shared files locally without added cross zone latency.
Common follow-ups: What happens if you try to mount EFS from a subnet without a mount target?;How do security groups control access to an EFS mount target?
VPC & Networking;AWS Backup & Disaster Recovery
How does EFS ensure data durability and availability?
Intermediate EFS Standard storage automatically stores data redundantly across multiple Availability Zones within a region, meaning your files remain available and durable even if an entire Availability Zone becomes unavailable, and this replication happens transparently without requiring any additional configuration from you as the user.
aws efs describe-file-systems --file-system-id fs-12345678
Real-world example A healthcare application relies on EFS's built in multi Availability Zone redundancy to guarantee that critical patient record files remain accessible even during a localized data center disruption in one Availability Zone.
Common follow-ups: What durability guarantee does AWS provide for EFS Standard storage?;How does One Zone storage differ in terms of durability?
AWS Backup & Disaster Recovery;S3 & Storage
How can you control access permissions for files and directories stored in EFS?
Intermediate EFS supports standard POSIX style file permissions just like a traditional Linux file system, controlling access at the user and group level, and it also integrates with IAM policies and EFS access points, which let you create application specific entry points into a file system with a defined root directory and enforced user identity, simplifying permission management across multiple applications sharing the same file system.
aws efs create-access-point --file-system-id fs-12345678 --posix-user Uid=1000,Gid=1000 --root-directory Path=/app-data
Real-world example A shared analytics platform creates a separate EFS access point for each team, each pointing to its own root directory within the same file system, ensuring one team cannot accidentally read or modify another team's files.
Common follow-ups: What is the difference between an EFS access point and mounting the file system directly?;Can IAM policies restrict which EC2 instances can mount an EFS file system?
IAM;AWS Secrets Manager & Parameter Store
How does EFS integrate with AWS Lambda and containerized workloads like ECS?
Advanced EFS can be mounted directly by Lambda functions and by ECS tasks, giving serverless and containerized workloads access to a persistent, shared file system that survives beyond the lifecycle of a single function invocation or container restart, which is especially useful for tasks like storing machine learning model files or shared configuration data that many function invocations need to access.
aws lambda update-function-configuration --function-name myFunction --file-system-configs Arn=arn:aws:elasticfilesystem:us-east-1:123456789012:access-point/fsap-12345678,LocalMountPath=/mnt/efs
Real-world example A machine learning inference service uses Lambda functions mounted to an EFS file system to access large pretrained model files that are too big to package directly with each function, avoiding repeated downloads on every invocation.
Common follow-ups: What are the performance considerations when Lambda functions access EFS?;How does mounting EFS affect Lambda cold start times?
Lambda & Serverless;Amazon ECS (Elastic Container Service)
What performance modes and throughput modes are available in EFS, and how do you choose between them?
Advanced EFS offers General Purpose performance mode for most workloads requiring the lowest latency, and Max I/O performance mode for highly parallelized workloads that can tolerate slightly higher latency in exchange for higher aggregate throughput, while throughput modes include Bursting, which scales with the amount of data stored, and Provisioned, which lets you specify a fixed throughput level independent of storage size for consistently high throughput needs.
aws efs create-file-system --performance-mode generalPurpose --throughput-mode provisioned --provisioned-throughput-in-mibps 100
Real-world example A big data analytics workload running on hundreds of parallel worker nodes chooses Max I/O performance mode combined with Provisioned throughput, ensuring consistent high throughput regardless of how much data is currently stored.
Common follow-ups: When should you choose Max I/O over General Purpose performance mode?;How does Provisioned throughput pricing compare to Bursting throughput?
Auto Scaling Groups;AWS Cost Management & Billing