What You Will Learn
Intermediate
- What EFS is and when to use it
- How it differs from EBS and S3
- How to mount EFS on EC2
EFS (Elastic File System) is shared NFS storage that multiple EC2 instances can access simultaneously. Automatically scales from GB to PB. Pay per GB used.
| Aspect | EBS | EFS | S3 |
|---|---|---|---|
| Access | One EC2 | Multiple EC2 | API/HTTP |
| Type | Block | File (NFS) | Object |
| Scaling | Fixed size | Auto-scaling | Auto |
| Latency | Lowest | Low | Higher |
Practical Exercise
Create an EFS file system
Launch 2 EC2 instances in the same VPC
Mount EFS on both:
mount -t nfs4 fs-xxx.efs.region.amazonaws.com:/ /mntWrite a file on instance 1, read it on instance 2
Key Takeaways
- EFS = shared NFS storage, multiple EC2 instances.
- Auto-scales, pay per GB used.
- EBS = one EC2 only. EFS = multiple EC2. S3 = API access.
- Best for: shared configs, web content, CMS uploads.
Comments
Comments
Post a Comment