Day 48 — Amazon EFS (Elastic File System) Simplified

Today I explored Amazon EFS (Elastic File System) — a fully managed, scalable file storage service used with AWS compute resources like EC2. It’s perfect when multiple instances need to access the same shared file system.


📁 What is Amazon EFS?

Amazon EFS provides a shared file storage system that can be mounted across multiple EC2 instances in multiple Availability Zones. It behaves like a traditional Linux file system — but in the cloud!

🔧 Key Features:

  • Fully managed and scalable

  • Supports NFS protocol

  • Elastic: Automatically grows and shrinks as files are added or removed

  • Can be accessed from multiple EC2 instances simultaneously

  • Data is stored redundantly across AZs for durability


🧰 Use Cases for EFS

  • Shared file system for web servers

  • Content management systems (CMS)

  • Development environments

  • Machine learning workloads

  • Application-level backups


🧩 EFS vs EBS vs S3

FeatureEFSEBSS3
TypeFile StorageBlock StorageObject Storage
AccessMultiple EC2sSingle EC2HTTP APIs
ProtocolNFSAttached diskREST/S3 API
Use CaseShared accessOS & DBStatic assets, backups

🏗️ Setting Up EFS

  1. Create a file system from AWS Console

  2. Choose VPC and mount targets in Availability Zones

  3. Configure security groups for NFS (port 2049)

  4. Mount the EFS to EC2 instances using:

     sudo mount -t nfs4 -o nfsvers=4.1 fs-XXXX.efs.<region>.amazonaws.com:/ /mnt/efs
    
  5. Start sharing files across EC2 instances!

🔐 Tip: Use security groups and IAM policies to control access.


💲 EFS Storage Classes

  • Standard: High durability and performance

  • Infrequent Access (IA): For files accessed less often (cost-saving)

  • Lifecycle Management: Move files automatically to IA after a set number of days


🧠 What I Learned Today

  • EFS is AWS’s solution for shared file systems in the cloud

  • It’s great for multi-instance apps, CMS, and dev environments

  • Easily scalable, durable, and secure — with minimal maintenance

    Up next: Amazon Auto Scaling

0
Subscribe to my newsletter

Read articles from Shaharyar Shakir directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Shaharyar Shakir
Shaharyar Shakir