By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
A Hyper-Practical, Zero-Fluff Study Guide for AWS Solutions Architect – Associate
You’re a cloud engineer at a SaaS company. Your team runs multiple EC2 instances (web servers, batch processors, CI/CD workers) that all need shared, persistent storage—like a network drive that every server can read/write to simultaneously. S3 is too slow for this (object storage, not file system), and EBS is tied to a single EC2 instance (no shared access). Amazon EFS (Elastic File System) is your answer.
What breaks if you ignore EFS?- Performance bottlenecks: If you use EBS for shared storage, you’ll hit I/O limits (EBS is single-instance).- Data inconsistency: If you sync files manually (e.g., rsync between EC2 instances), you’ll have race conditions.- Cost overruns: If you store everything in EFS Standard when 80% of your data is rarely accessed, you’re wasting money.
rsync
Real-world scenario:You’re migrating a legacy monolithic app to AWS. The app uses a shared /data directory for user uploads, logs, and temporary files. EFS is the only AWS service that lets you mount the same file system across dozens of EC2 instances without rewriting the app.
/data
us-east-1
efs:CreateFileSystem
✅ AWS account with admin IAM permissions✅ VPC with at least 2 subnets in different AZs (for high availability) ✅ EC2 instance (Amazon Linux 2) in one of the subnets
# Create EFS with encryption & lifecycle policy (moves files to IA after 30 days) aws efs create-file-system \ --creation-token "my-efs-$(date +%s)" \ --performance-mode generalPurpose \ --throughput-mode bursting \ --encrypted \ --tags Key=Name,Value=MyAppEFS \ --lifecycle-policies TransitionToIA=AFTER_30_DAYS
Expected Output:
{ "FileSystemId": "fs-12345678", "CreationToken": "my-efs-1678901234", "Encrypted": true, "LifeCycleState": "creating" }
✅ Verify:
aws efs describe-file-systems --file-system-id fs-12345678
# Get your VPC ID and subnet IDs VPC_ID=$(aws ec2 describe-vpcs --query "Vpcs[0].VpcId" --output text) SUBNETS=$(aws ec2 describe-subnets --filters "Name=vpc-id,Values=$VPC_ID" --query "Subnets[*].SubnetId" --output text) # Create mount targets in each subnet for SUBNET in $SUBNETS; do aws efs create-mount-target \ --file-system-id fs-12345678 \ --subnet-id $SUBNET \ --security-groups sg-12345678 # Replace with your SG allowing NFS (port 2049) done
aws efs describe-mount-targets --file-system-id fs-12345678
# SSH into your EC2 instance ssh -i "your-key.pem" ec2-user@your-ec2-public-ip # Install NFS client (Amazon Linux 2) sudo yum install -y amazon-efs-utils # Create a mount directory sudo mkdir /mnt/efs # Mount EFS (replace fs-12345678 with your FileSystemId) sudo mount -t efs fs-12345678:/ /mnt/efs # Verify df -h | grep efs
fs-12345678.efs.us-east-1.amazonaws.com:/ 8.0E 0 8.0E 0% /mnt/efs
? Make it persistent (add to /etc/fstab):
/etc/fstab
echo "fs-12345678:/ /mnt/efs efs _netdev,tls,iam 0 0" | sudo tee -a /etc/fstab
# Create a test file echo "Hello, EFS!" | sudo tee /mnt/efs/test.txt # Verify it exists ls -l /mnt/efs/ cat /mnt/efs/test.txt
-rw-r--r-- 1 root root 13 Mar 10 12:34 test.txt Hello, EFS!
--encrypted
2049
PercentIOLimit
efs-utils
Environment=Prod
App=MyApp
BurstCreditBalance
ClientConnections
PermittedThroughput
PercentIOLimit > 80%
StorageBytes > 1TB
TransitionToIA=AFTER_30_DAYS
❌ EBS (single-instance), S3 (object storage, not file system).
"You have 1TB of logs, 90% of which are accessed once a month. How do you reduce costs?"
❌ Keep everything in EFS Standard (expensive).
"Your app needs 10,000 IOPS for shared storage. What do you use?"
Challenge:You have two EC2 instances in different AZs. You need to: 1. Create an EFS volume with lifecycle management (30 days → IA).2. Mount it on both instances.3. Verify that a file created on Instance A appears on Instance B.
Solution:1. Create EFS: bash aws efs create-file-system --creation-token "challenge-efs" --encrypted --lifecycle-policies TransitionToIA=AFTER_30_DAYS 2. Create mount targets in both AZs.3. Mount on both EC2 instances: bash sudo mount -t efs fs-12345678:/ /mnt/efs 4. Test: ```bash # On Instance A: echo "Hello from A" | sudo tee /mnt/efs/test.txt
bash aws efs create-file-system --creation-token "challenge-efs" --encrypted --lifecycle-policies TransitionToIA=AFTER_30_DAYS
bash sudo mount -t efs fs-12345678:/ /mnt/efs
# On Instance B: cat /mnt/efs/test.txt # Should output "Hello from A" ``` Why it works:EFS is shared storage—any file written by one instance is immediately visible to others.
aws efs create-file-system --encrypted
aws efs create-mount-target --subnet-id
mount -t efs fs-12345678:/ /mnt/efs
EFS is the only AWS service that gives you shared, scalable, multi-AZ file storage without managing servers. Use it for:✅ Web apps (shared /uploads directory) ✅ CI/CD pipelines (shared workspace) ✅ Batch processing (shared input/output)
/uploads
Avoid it for:❌ Databases (use EBS or RDS) ❌ Static assets (use S3) ❌ Single-instance workloads (use EBS)
Now go mount an EFS volume and see it in action! ?
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.