Amazon EFS: Shared File Storage for Your AWS Workloads (2024)

Amazon Elastic File System (EFS) is a scalable, fully-managed cloud-based file storage service provided by Amazon Web Services (AWS). It allows multiple EC2 instances to access a shared file system, which is ideal for use cases like web serving, content management, and data sharing across different applications. EFS provides the flexibility and scalability required to handle dynamic workloads and offers high availability and durability by storing data redundantly across multiple Availability Zones (AZs).

Amazon EFS: Shared File Storage for Your AWS Workloads (2)
  1. Scalability: EFS automatically scales up or down as you add or remove files without any need for manual intervention.
  2. Availability and Durability: Data is stored redundantly across multiple AZs.
  3. Compatibility: Supports Network File System (NFS) protocol, making it compatible with various operating systems and applications.
  4. Security: Integrates with AWS IAM, VPC, and AWS KMS for robust security measures.

While Amazon Elastic Block Store (EBS) is a reliable storage solution, it has some limitations:

  1. Single Instance Attachment: EBS volumes can only be attached to a single EC2 instance at a time, limiting its use for shared storage scenarios.
  2. Scalability: EBS requires manual intervention to resize volumes and adjust performance, which can be cumbersome and time-consuming.
  3. Availability: EBS volumes are tied to a single Availability Zone (AZ), making them less resilient to AZ failures compared to EFS, which spans multiple AZs for high availability and durability.

Amazon EFS overcomes these limitations by providing a shared file system that can be accessed by multiple EC2 instances simultaneously, automatically scaling to accommodate varying workloads, and offering higher availability through multi-AZ storage.

Step 1: Create an Amazon EFS File System

  1. Navigate to the EFS Console:
  • Log in to the AWS Management Console and go to the EFS service.
Amazon EFS: Shared File Storage for Your AWS Workloads (3)

2. Create a New File System:

  • Click on “Create file system.”
  • Select the VPC where your EC2 instances are running.
  • Choose the availability zones (AZs) and subnets where you want your EFS mount targets.
  • Configure performance and throughput modes as per your requirement.
  • Click on “Create” to provision your file system.
Amazon EFS: Shared File Storage for Your AWS Workloads (4)
Amazon EFS: Shared File Storage for Your AWS Workloads (5)
Amazon EFS: Shared File Storage for Your AWS Workloads (6)
  • After reviewing your settings, click on create.
Amazon EFS: Shared File Storage for Your AWS Workloads (7)

Step 2: Configure Security Groups

  1. Edit Security Groups:
  • Ensure the security groups associated with your EC2 instances allow inbound NFS traffic (port 2049).
Amazon EFS: Shared File Storage for Your AWS Workloads (8)
  • Also, configure the EFS security group to allow inbound NFS traffic from the security groups of your EC2 instances.
Amazon EFS: Shared File Storage for Your AWS Workloads (9)

Step 3: Mount the EFS File System on EC2 Instances

  1. Install NFS Utilities:
  • SSH into your EC2 instances, in the EC2, we have apache web server installed and we have to mount this EFS storage to our document root and for this first we need to install NFS client utilities. For Amazon Linux, use:
sudo yum install nfs-utils -y
Amazon EFS: Shared File Storage for Your AWS Workloads (10)

2. Mount the EFS File System:

  • Mount the EFS directory to documentRoot, i.e, /var/www/html :
  • Copy the Dns Name of your EFS storage:
Amazon EFS: Shared File Storage for Your AWS Workloads (11)
  • Go to your EC2-Instance and mount this to your directory.
sudo mount fs-0f125e4a9f2b41406.efs.us-west-1.amazonaws.com:/ /var/www/html/
Amazon EFS: Shared File Storage for Your AWS Workloads (12)
Amazon EFS: Shared File Storage for Your AWS Workloads (13)

REPEAT THE SAME STEPS IN OTHER EC2-INSTANCE ALSO, WHICH HAS THE SAME WEB SERVER SETUP:

Amazon EFS: Shared File Storage for Your AWS Workloads (14)

For Web Server Setup run below 2 commands:

sudo yum install httpd -y
sudo systemctl start httpd

Step 4: Verification

  • Create index.html file in one of the instance and you will see that other instance will automatically get this file.
Amazon EFS: Shared File Storage for Your AWS Workloads (15)
  • Now go to the second instance and check whether this file is present there or not.
Amazon EFS: Shared File Storage for Your AWS Workloads (16)
  • Let’s also check this from web browser. Hit the public IPs of both the instances and see they are returning same data.
Amazon EFS: Shared File Storage for Your AWS Workloads (17)
Amazon EFS: Shared File Storage for Your AWS Workloads (18)
  • Monitoring and Logging: Use Amazon CloudWatch to monitor your EFS file system and set up alerts for critical metrics.
  • Backup and Restore: Regularly back up your EFS file system using AWS Backup to protect against data loss.
  • Cost Management: Be aware of the storage costs associated with EFS and use lifecycle management policies to transition infrequently accessed files to EFS Infrequent Access (IA) to reduce costs.

Amazon EFS is a powerful, scalable, and flexible file storage solution that integrates seamlessly with other AWS services. It simplifies file storage management, making it an excellent choice for applications requiring shared storage with high availability and durability. By following the practical steps outlined above, you can easily set up and use EFS in your AWS environment to enhance your application’s performance and reliability.

Amazon EFS: Shared File Storage for Your AWS Workloads (2024)
Top Articles
911+ OBi | PunchAlert
How much of my income should I save? - ubank
Time in Baltimore, Maryland, United States now
Free Atm For Emerald Card Near Me
Gore Videos Uncensored
Aces Fmc Charting
Katie Boyle Dancer Biography
Lesson 3 Homework Practice Measures Of Variation Answer Key
Aries Auhsd
Job Shop Hearthside Schedule
Craigslist Free Stuff Greensboro Nc
10-Day Weather Forecast for Santa Cruz, CA - The Weather Channel | weather.com
Huntersville Town Billboards
Lowes Undermount Kitchen Sinks
Att.com/Myatt.
Rqi.1Stop
Conan Exiles Sorcery Guide – How To Learn, Cast & Unlock Spells
Isaidup
The Largest Banks - ​​How to Transfer Money With Only Card Number and CVV (2024)
Ou Class Nav
Renfield Showtimes Near Paragon Theaters - Coral Square
R/Mp5
Perry Inhofe Mansion
Ilabs Ucsf
123Moviestvme
Shiftwizard Login Johnston
CARLY Thank You Notes
Poe Flameblast
Cheetah Pitbull For Sale
Wayne State Academica Login
Vons Credit Union Routing Number
Who Is Responsible for Writing Obituaries After Death? | Pottstown Funeral Home & Crematory
Weekly Math Review Q2 7 Answer Key
Ds Cuts Saugus
Differential Diagnosis
Santa Clara County prepares for possible ‘tripledemic,’ with mask mandates for health care settings next month
Cuckold Gonewildaudio
Rs3 Nature Spirit Quick Guide
Petra Gorski Obituary (2024)
Enr 2100
From Grindr to Scruff: The best dating apps for gay, bi, and queer men in 2024
Amateur Lesbian Spanking
Market Place Tulsa Ok
Contico Tuff Box Replacement Locks
Rite Aid | Employee Benefits | Login / Register | Benefits Account Manager
Kushfly Promo Code
CPM Homework Help
Basic requirements | UC Admissions
211475039
What Responsibilities Are Listed In Duties 2 3 And 4
Supervisor-Managing Your Teams Risk – 3455 questions with correct answers
Latest Posts
Article information

Author: Dean Jakubowski Ret

Last Updated:

Views: 5858

Rating: 5 / 5 (70 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Dean Jakubowski Ret

Birthday: 1996-05-10

Address: Apt. 425 4346 Santiago Islands, Shariside, AK 38830-1874

Phone: +96313309894162

Job: Legacy Sales Designer

Hobby: Baseball, Wood carving, Candle making, Jigsaw puzzles, Lacemaking, Parkour, Drawing

Introduction: My name is Dean Jakubowski Ret, I am a enthusiastic, friendly, homely, handsome, zealous, brainy, elegant person who loves writing and wants to share my knowledge and understanding with you.