Amazon Elastic File System Hands-On

Demo

In this demo, we will:

  1. Create a VPC with public subnets
  2. Launch EC2 instances in different Availability Zones
  3. Create and configure an Amazon EFS file system
  4. Mount the EFS file system on EC2 instances
  5. Test file sharing between instances
  6. Clean up resources

Agenda

Demo Overview

Create VPC

EFS-Demo-VPC
EFS-Demo-Instance-1

Launch 1st instance

EFS-Demo-Key-Pair

Key pair (login)

Network settings

Inbound Security Group Rules

Launch 2nd instance

EFS-Demo-Instance-2

Key pair (login)

Network settings

EFS - Create file system

EFS-Demo-FileSystem

EFS-Demo-FileSystem

Uncheck

Edit EFS Settings

Performance settings

File system protection

Edit inbound rules of Default Security Group

Attach Commands

Connect to 1st EC2 Instance

sudo yum install -y amazon-efs-utils
sudo mkdir /efs
sudo mount -t efs tls fs-0850a01645f4cfc66:/ /efs
mount|grep efs
df -h
echo "Hello from Instance 1" | sudo tee /efs/testfile.txt
cat /efs/testfile2.txt
cat /efs/testfile.txt
echo "Hello from Instance 2" | sudo tee /efs/testfile2.txt

Clean Up

Terminate EC2 Instances

Delete EFS File System

Delete VPC

🙏

Thanks

for

Watching