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
How Inflation Affects Car Loan Rates | Bankrate
7 Signs Your Company Has Good Financial Health | QuickBooks
Great Clips Mount Airy Nc
Uhauldealer.com Login Page
What is Mercantilism?
Limp Home Mode Maximum Derate
Falgout Funeral Home Obituaries Houma
Sissy Transformation Guide | Venus Sissy Training
Hotels Near 500 W Sunshine St Springfield Mo 65807
2021 Tesla Model 3 Standard Range Pl electric for sale - Portland, OR - craigslist
Azeroth Pilot Reloaded - Addons - World of Warcraft
Sarpian Cat
Worcester On Craigslist
Craigslist Motorcycles Orange County Ca
Craigslist List Albuquerque: Your Ultimate Guide to Buying, Selling, and Finding Everything - First Republic Craigslist
Les Rainwater Auto Sales
1-833-955-4522
Rondom Ajax: ME grijpt in tijdens protest Ajax-fans bij hoofdbureau politie
Danforth's Port Jefferson
Mccain Agportal
Amazing deals for Abercrombie & Fitch Co. on Goodshop!
Nsa Panama City Mwr
Regal Amc Near Me
Does Hunter Schafer Have A Dick
Piri Leaked
Page 2383 – Christianity Today
Random Bibleizer
Cars & Trucks - By Owner near Kissimmee, FL - craigslist
What Is a Yurt Tent?
Tim Steele Taylorsville Nc
Where to eat: the 50 best restaurants in Freiburg im Breisgau
Florence Y'alls Standings
Smayperu
Soiza Grass
Matlab Kruskal Wallis
Sun Haven Pufferfish
Synchrony Manage Account
Shih Tzu dogs for sale in Ireland
Spectrum Outage in Genoa City, Wisconsin
Vons Credit Union Routing Number
Nami Op.gg
Top 40 Minecraft mods to enhance your gaming experience
Vintage Stock Edmond Ok
Ouhsc Qualtrics
Identogo Manahawkin
Clock Batteries Perhaps Crossword Clue
Amourdelavie
Tenichtop
Coldestuknow
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.