Profile Applicability:

  • Level 2

Description:

Amazon FSx provides fully managed file systems for Windows and Lustre. Ensuring that FSx cache is properly mounted on instances is important for applications that require high-performance storage. Mounting the FSx cache ensures that your file systems are accessible and can be used for processing data or serving files to applications.

Rationale:

Mounting FSx cache ensures:

  • Access to fast, temporary storage for data processing

  • High performance with minimal latency for file system operations

  • Integration with applications that require distributed file systems

  • Cost-effective use of cache for applications that process large datasets

Default Value:

By default, FSx file systems are not mounted on EC2 instances. You must manually mount the cache to the instances for use.

Impact:

Pros:
 • Provides fast, low-latency access to temporary data
• Supports high-performance applications that require shared storage
 • Easy integration with AWS services for data processing

Cons:
 • Misconfigured or missing mounts may lead to application errors
• Requires manual setup and monitoring for availability
 • Can lead to higher costs if not cleaned up properly after us

Pre-requisites:

IAM Permissions Required:
 
fsx:DescribeFileSystemsfsx:DescribeMountTargetsec2:DescribeInstancesec2:AttachVolumeec2:RunInstances
 Access to FSx file systems and EC2 instances

Remediation:

Test Plan:

Using AWS Console:
 • Log in to the AWS Management Console
 • Navigate to 
FSx > File systems
 • Select the FSx file system you want to mount
 • Go to the 
Mount targets section and identify the target IP address for mounting
• SSH into your EC2 instance
• Ensure the correct mount command is used to mount the cache on the instance
 • Confirm that the mount is successful and accessible by running file system operations

Using AWS CLI:

aws fsx describe-file-systems \
  --file-system-id fs-xxxxxxxxxxxxxxxxx
aws fsx describe-mount-targets \
  --file-system-id fs-xxxxxxxxxxxxxxxxx

Implementation Plan:

Using AWS Console:
 • Navigate to FSx > File systems
 • Select the File system you want to mount
 • Under the 
Mount targets section, copy the Mount target IP address
 • SSH into the EC2 instance where the file system will be mounted
 • Run the 
mount command (for Linux)

sudo mount -t nfs -o nfsvers=4.1 <mount-target-ip>:/ fsx-mount

• For Windows, use the mount network drive functionality
 • Confirm access by checking the mount on the instance

Using AWS CLI:
 Step 1: List the FSx mount targets

aws fsx describe-mount-targets \
  --file-system-id fs-xxxxxxxxxxxxxxxxx

Step 2: Mount the file system (Linux example)

sudo mount -t nfs -o nfsvers=4.1 <mount-target-ip>:/ fsx-mount

Step 3: Verify the mount

df -h

Step 4: For Windows, use the net use command to mount:

net use Z: \\<mount-target-ip>\<share-name>

Backout Plan:

Using AWS Console:
 • Unmount the FSx file system from the EC2 instance
 • Navigate to 
FSx > Mount targets and disassociate any unnecessary targets
 • If data was accidentally written to a temporary mount, verify that data is backed up before unmounting

Using AWS CLI:

sudo umount fsx-mount

For Windows, unmount:

nt use Z: /delete

References: