Aws Elastic File System -2
How to Provision an EFS Location?
Step:1)
1. Create a VPC
VPCName: EFSVPC
CIDR: 172.0.0.0/16
Step:2)
Create Subnets
2 Public Subnets: EC2 instances
2 Private Subnets: EFS
Public Subnet:
Subnet name: EFSpubsn1, 172.0.1.0/24
Subnet Name: EFSpubsn2, 172.0.2.0/24
Private Subnet:
Subnet name: EFSprvsn3, 172.0.3.0/24
Subnet name: EFSprvsn4, 172.0.4.0/24
create an Internet gateway for public subnets and attach to EFSvpc
|-EFSVPC
creates route table route table name {EFSpublicroutetable}
|- add subnet associate [EFSpubsn1 & EFSpubsn2]
|- add route table [0.0.0.0/0 -> IG]
see the below diagram
Step:3)
create Security Group:-
create two security groups 1) Ec2 instances and 2) EFS
5.1 Ec2 Instance security group:
Inbound: SSH, 22, 0.0.0.0/0 outbound: any, all, 0.0.0.0/0
5.2 EFS Security Group
Inbound: NFS, 2049, 172.0.0.0/16 (within VPC)
Step:4)
Create a Two Ec2 Instance in Public Subnets
SSH into the Ec2 instances like
SSH -i pem. file location ubuntu@public ip
4.1 update cache
sudo apt update -y
4.2 install nfs-common
sudo apt install nfs-common
Step:5)
5.1 provision EFS
create File System ----> Select VPC ----> Name: EFSVPC ---> Standard ---> Disable Automatic Backups ----> Bursting -----> Select Private Subnets
( Security Groups) ----> Next ----> Create attach ---> Mount Via IP -----> Copy Using NFS client paste in Both Ec2 Instances.
there are two ways we can access the EFS location.
1. Mount TargetsSca
2. Access Points
Thank You,๐
Follow me on LinkedIn to see interesting posts like this : )
Subscribe to my newsletter
Read articles from Samara Reddy directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by