Aws Module 4
Aws Module 4
The security group that you associate with a mount target must allow inbound access for TCP on
port 2049 for Network File System (NFS). This is the security group that you will now create,
configure, and attach to your EFS mount targets.
Copy the Security group ID of the EFSClient security group to your text editor.
Under the Inbound rules section, choose Add rule then configure:
Type: NFS
Custom
In the Custom box, paste the security group's Security group ID that you copied to your text editor
On Step 1:
Key: Name
Choose Next
Detach the default security group from each Availability Zone mount target by choosing the check
box on each default security group.
Attach the EFS Mount Target security group to each Availability Zone mount target by:
Your mount targets should look like the following example. The diagram shows two mount targets in
the Lab VPC that use the EFS Mount Target security group. In this lab, you should be using the Lab
VPC.
Choose Next
On Step 4:
Choose Create
Congratulations! You have created a new EFS file system in your Lab VPC and mount targets in each
Lab VPC subnet. In a few seconds, the File system state of the file system will change to Available,
followed by the mount targets 2–3 minutes later.
Proceed to the next step after the Mount target state for each mount target changes to Available.
Choose the screen refresh button after 2–3 minutes to check its progress.
Note: You may need to scroll to the right in the File systems pane to find the File system state.
These instructions are specifically for Microsoft Windows users. If you are using macOS or Linux,
skip to the next section.
Above these instructions that you are currently reading, choose the Details dropdown menu, and
then select Show
Choose the Download PPK button and save the labsuser.ppk file.
Note: Typically, your browser saves the file to the Downloads directory.
To use SSH to access the EC2 instance, you must use *PuTTY*. If you do not have PuTTY installed on
your computer, download PuTTY.
Open putty.exe.
To keep the PuTTY session open for a longer period of time, configure the PuTTY timeout:
Choose Connection
Choose Session
Host Name (or IP address): Paste the EC2PublicIP for the instance you noted earlier
Browse to the labsuser.ppk file that you downloaded, select it, and choose Open
Microsoft Windows users: Choose this link to skip ahead to the next task.
Task 4: Creating a new directory and mounting the EFS file system
Amazon EFS supports the NFSv4.1 and NFSv4.0 protocols when it mounts your file systems on EC2
instances. Though NFSv4.0 is supported, we recommend that you use NFSv4.1. When you mount
your EFS file system on your EC2 instance, you must also use an NFS client that supports your chosen
NFSv4 protocol. The EC2 instance that was launched as a part of this lab includes an NFSv4.1 client,
which is already installed on it.
In your SSH session, make a new directory by entering sudo mkdir efs
Back in the AWS Management Console, on the Services menu, choose EFS.
In the Amazon EFS Console, on the top right corner of the page, choose Attach to open the Amazon
EC2 mount instructions.
Copy the entire command in the Using the NFS client section.
The provided sudo mount... command uses the default Linux mount options.
In your Linux SSH session, mount your Amazon EFS file system by:
Pressing ENTER
Get a full summary of the available and used disk space usage by entering:
sudo df -hT
This following screenshot is an example of the output from the following disk filesystem command:
df -hT
Notice the Type and Size of your mounted EFS file system.
disk space
The fio command will take 5–10 minutes to complete. The output should look like the example in
the following screenshot. Make sure that you examine the output of your fio command, specifically
the summary status information for this WRITE test.
You might need to wait 2–3 minutes and refresh the screen several times before all available
metrics, including PermittedThroughput, calculate and populate.
On the graph, choose and drag around the data line. If you do not see the line graph, adjust the time
range of the graph to display the period during which you ran the fio command.
choose drag
Pause your pointer on the data line in the graph. The value should be 105M.
Throughput
The throughput of Amazon EFS scales as the file system grows. File-based workloads are typically
spiky. They drive high levels of throughput for short periods of time, and low levels of throughput
the rest of the time. Because of this behavior, Amazon EFS is designed to burst to high throughput
levels for periods of time. All file systems, regardless of size, can burst to 100 MiB/s of throughput.
For more information about performance characteristics of your EFS file system, see the official
Amazon Elastic File System documentation.
If you do not see DataWriteIOBytes in the list of metrics, use the File System Metrics search to find
it.
Sum 1 Minute
The throughput that is available to a file system scales as a file system grows. All file systems deliver
a consistent baseline performance of 50 MiB/s per TiB of storage. Also, all file systems (regardless of
size) can burst to 100 MiB/s. File systems that are larger than 1T B can burst to 100 MiB/s per TiB of
storage. As you add data to your file system, the maximum throughput that is available to the file
system scales linearly and automatically with your storage.
File system throughput is shared across all EC2 instances that are connected to a file system. For
more information about performance characteristics of your EFS file system, see the official Amazon
Elastic File System documentation.
Congratulations! You created an EFS file system, mounted it to an EC2 instance, and ran an I/O
benchmark test to examine its performance characteristics.