Skip to content

EFS Hands onΒΆ

Before we start using EFS - Elastic File System, we have to go to Security Groups and create a new security group. All the [[inbound]]/[[outbound]] rules can be left at default.

Next, we can go to EFS Service.

And click on Create file system

Change the default security group to the previously created one.

When going through, we should see that the EFS - Elastic File System is creating, it has a File system ID and it has 3 [[IP]]s on each specified Availability Zones.

When the [[EFS instance]]s are done setup, we can go to AWS EC2 and launch a new instance.

When creating it, select an Availability Zone.

When the instance has been created, right-click on it and select Launch more like this.

Then click on Edit Instance details and select a different Availability Zone.

Once that's done, we can [[SSH]] into the instances and setup the EFS - Elastic File System. The instructions for that are available at the EFS page.

sudo yum install -y amazon-efs-utils
sudo mkdir /efs
sudo mount -t efs -o tls fs-aff48164:/ /efs

When adding these rules, you will experience a timeout.

mount.nfs4: Connection reset by peer
Failed to initialize TLS tunnel for fs-aff48164

In order to fix this, we will need to change the settings to the Security Group by adding inbound NFS for the security group that the ec2 instances has.

Now we can mount it and test it between the instances on different Availability Zones: