Learning AWS Day by Day — Day 8 — Introduction to EFS (Elastic File System)

Saloni Singh - Mar 17 - - Dev Community

Exploring AWS !!

Day 8:

Introduction to EFS (Elastic File System):

Cloud based file storage service for applications and workloads that run in AWS public cloud.
Why? If our application is running on Amazon EC2 and needs a file system or any case where file system is needed.
EFS cannot connect to Windows, only to Linux.
For Windows, shared storage will be FSx.

Image description

Benefits: Highly available, Elastic, Shared FS, High performance.

Creating and Mounting EFS:
— Creating EFS:

  1. Open AWS, click on Services drop down, choose EFS.
  2. Choose Create FS.
  3. Choose Default VPC from VPC list.
  4. Tick off all checkboxes for Availability zones, and click Next.
  5. Name and tags.
  6. Select General Purpose and Bursting for High performance.
  7. Review file system properties once and then choose Create FS.
  8. Note FS ID.

— Mounting EFS onto an EC2 instance:

  1. Connect Ubuntu using Putty.
  2. Install NFS using: sudo apt-get -y install nfs-common
  3. Proceed with below commands: sudo mkdir efs sudo mount -t efs fs-abcd123456789ef0 efs/ cd efs sudo mkdir getting-started sudo chown ec20user getting-started cd getting-started touch test.txt ls -al

— Connecting multiple instances with shared EFS:

  1. Create another EC2 instance(Ubuntu).
  2. Mount previously created EFS onto it.
  3. Create a file in EFS directory in second instance.
  4. Verify in first instance whether file created in second instance is available.

To check → Connect to putty using instance → On account search EFS → Create FS → Click on FS → View details → Attach → Mount via IP → enter zone → Copy command → mkdir efs → sudo apt-get -y install nfs-command → paste the commands.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player