You can modify it from the network tab in EFS and assign your own security group. Several settings are not optimal, such as a security group. Let’s see if the EFS can be found after rebooting.įor some reasons, the address become 127.0.0.1, however, it seems working normally. echo ".com:/ /mnt/efs efs _netdev,tls,iam 0 0" | sudo tee -a /etc/fstab To access your file system, you mount the file system using the standard Linux mount command and the file system’s DNS name. Lastly, make it automatically mount when you reboot the instance. Now we will back to our EC2 terminal.įirst, mount the EFS using following command.įs-xxxxxxxx is the id of your EFS, you can find it from your EFS page. Okay, all the relevant setting that we can do from AWS console is done. It’s also an unusual part of the Unix/Linux toolkit. Instead, it lets us read from and write to block devices for example, physical hard drives. It’s not used to copy individual files like cp. Now, we add one more security group which is default. In the venerable Unix command dd, the disk/data duplicator (or, sometimes, disk destroyer) allows us to copy raw data from one source to another. We have to work on two things additionally.įirst, we need to assign the role, and we need to add one more security group to the EC2 instance. They don’t have EFS related policy by default, so let’s make one.Ĭhoose EFS as a service, set all the actions finally, choose the EFS you just made as a resource.īack to the role-related page, and choose the policy that you just made. Make a folder that EFS will be associated sudo mkdir /mnt/efs Install relevant package using following command sudo apt-get update We will work on security group setting later. To automatically mount a file system using an access point. sudo mount -t efs -o tls,accesspoint access-point-id file-system-id efs-mount-point. Just launch the instance with default setting. When you mount a file system using an access point, the mount command includes the access-point-id and the tls mount option in addition to the regular mount options. Since you are here to work on EFS, I assume you know how to launch the EC2 instance, so I will skip the explanation on this part. Therefore, we decided to use EFS as a Network File System (NFS).įrom AWS Management Console, find the EFS. In our case, the key requirement was accessing files without using S3 over the different EC2 instances. I recently had to work on a video-related project that requires downloading and analyzing but doesn’t need to be stored after analysis. When the file is not required to be stored permanently but big, S3 might not be the best choice. Mounting your server First, we need to make an EFS folder in the root directory cd / sudo mkdir efs From here, we need to install the NFS client to connect the current server to the EFS share.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |