100 Days of DevOps — Day 47-Introduction to Amazon Elastic File System (EFS)
Welcome to Day 47 of 100 Days of DevOps, Focus for today is Amazon Elastic File System (EFS)
What is Amazon EFS?
Amazon EFS provides scalable file storage for use with Amazon EC2. You can create an EFS file system and configure your instances to mount the file system. You can use an EFS file system as a common data source for workloads and applications running on multiple instances.
Step1: Create a security group to access your AWS EFS Filesystem
- To enable traffic between EC2 instance and EFS Filesystem we must need to allow port 2049.
- On the EC2 client side, we must need to allow outbound access to Port 2049. As we are allowing all the outbound traffic so this pre-requisite is already met.
- On the mount target end, we must need to allow TCP Port 2049 inbound for NFS from all EC2 instances on which we want to mount the filesystem.
Go to https://us-west-2.console.aws.amazon.com/ec2 → NETWORK & SECURITY → Security Groups --> Create Security Group
* Type : Should be NFS
* Source: Rather than opening it for the entire subnet, we are only opening it for EFS Client Security Group
Step2: Create an Amazon EFS FileSystem
- EFS FileSystem can be mounted to multiple EC2 instances running in different availability zone with the same region. These instances use mount targets created in each Availability Zone to mount the filesystem using the standard Network File System v4.1(NFS v4.1).
NOTE: All the instances where we are trying to mount the Filesystem must be the part of the same VPC.
https://us-west-2.console.aws.amazon.com/efs → Create file system
* Add tag to your FileSystem
* Keep all the other values default
* Review and create the filesystem
- Once it's available you will see something like this
- Now if click on the Amazon EC2 mount instructions(from local VPC), that will give you the detailed instruction which package to install and how to mount the filesystem
Looking forward from you guys to join this journey and spend a minimum an hour every day for the next 100 days on DevOps work and post your progress using any of the below medium.
- Twitter: @100daysofdevops OR @lakhera2015
- Facebook: https://www.facebook.com/groups/795382630808645/
- Medium: https://medium.com/@devopslearning
- Slack: https://devops-myworld.slack.com/messages/CF41EFG49/
- GitHub Link:https://github.com/100daysofdevops
Reference