> ## Documentation Index
> Fetch the complete documentation index at: https://cloud-architect.ipoint-labs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuring Amazon FSx for Lustre with EC2 Instances for Shared High-Performance Storage Access

> Hands-on lab · 45m

Launch this lab in the IP Lab Portal, then follow the steps below in the AWS console.

<a className="ip-lab-portal-btn" href="https://labs.intellectualpoint.com/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance" target="_blank" rel="noreferrer">
  Open IP Lab Portal
</a>

## Overview

### Lab Details

1. In this lab, you will create an Amazon FSx for Lustre file system with a storage capacity of 1.2 TB. Next, you will launch and configure two EC2 instances to mount the FSx Lustre file system and create files on it. Additionally, a third EC2 instance will be set up to mount the same FSx Lustre file system and view the files created by the other instances. This setup demonstrates shared high-performance storage access across multiple EC2 instances.
2. Duration: **45 minutes**.
3. AWS Region: **US East (N. Virginia) us-east-1**.

### Introduction

#### What is FSx Lustre?

* **Amazon FSx** for Lustre is a fully managed, high-performance file system built on the open-source Lustre technology. It is designed to provide fast, scalable, and shared storage for compute-intensive workloads. FSx Lustre integrates seamlessly with Amazon EC2, enabling multiple instances to access data concurrently with low latency.

  * Provides low-latency, high-throughput shared storage
  * Supports multiple EC2 instances accessing data simultaneously
  * Ideal for workloads like machine learning, big data, and HPC

#### Lab Feature:

* In this lab, you will create a 1.2 TB Amazon FSx for Lustre file system and configure multiple EC2 instances to mount and access it. You will practice creating and sharing files across the EC2 instances using the high-performance Lustre file system. The lab demonstrates concurrent read and write operations, providing hands-on experience with FSx Lustre integration and management on AWS.

#### Benefits:

* Provides high-speed, low-latency access to shared storage across multiple EC2 instances
* Enables efficient processing of large datasets with scalable storage capacity
* Fully managed service, reducing storage management overhead

### Architecture Diagram

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/001.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=77ddff230b105480d507355ad671deb9" alt="" width="1177" height="687" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/001.png" />

### Task Details

1. Sign in to the AWS Management Console.
2. Create a FXs File System
3. Launch an EC2 Instances
4. Mount FSx for Lustre on EC2
5. Delete Fxs file System

### Launching Lab Environment

1. To launch the lab environment, Click on the **Start Lab** button.
2. Please wait until the cloud environment is provisioned. It will take less than a minute to provision.
3. Once the Lab is started, you will be provided with **IAM user name, Password, Access Key,** and **Secret Access Key**.

> **Note:** You can only start one lab at any given time.

## Lab guide

#### Lab Steps

#### Task 1: Sign in to AWS Management Console

1. Click on the **Open Console** button, and you will get redirected to AWS Console in a new browser tab.
2. On the AWS sign-in page,

   * Leave the **Account ID** as default. Never edit/remove the 12 digit Account ID present in the AWS Console. otherwise, you cannot proceed with the lab.
   * Now copy your **User Name** and **Password** in the Lab Console to the **IAM Username and Password** in AWS Console and click on the **Sign in** button.
3. Once Signed In to the AWS Management Console, Make the default AWS Region as **US East (N. Virginia) us-east-1**.

#### Task 2: Create a FXs File System

1. Navigate to the EC2 portal, click Security Groups in the left-hand panel under Network & Security

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/002.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=95c8c90bb66e8fd86d2427fe5e851748" alt="" width="206" height="174" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/002.png" />

2. Then click "Create Security Group".

* Enter the name as "FSx\_Sg"
* Enter Description as "Allow Ports to create FSx Security Group"
* Select the **default VPC .**

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/003.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=1c35ca57f6d8f2dca3dbc8b8d061465b" alt="" width="1019" height="346" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/003.png" />

3. Under Inbound rules, add a rule for

* **SSH Rule**:
* Type : **SSH,** Protocol **: TCP,** Port Range: **22,** Source: **Anywhere (0.0.0.0/0)**
* **Custom TCP Rule**:
* Type : **Custom TCP,** Protocol **: TCP,** Port Range: **988,** Source: **Anywhere (0.0.0.0/0)**
* Leave other settings as default.

> **Note :** Port **988** is opened to allow EC2 instances to connect with the **Lustre file system**.

* Click **Create Security Group.**

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/004.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=34dfaa294a26628c84c5c3ff22ba422d" alt="" width="1451" height="282" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/004.png" />

3. Navigate to **FSx.**  Ensure, you are in the **US East (N. Virginia) us-east-1** region to begin launching an EC2 instance in the Amazon cloud.

* Click **Create file System.**

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/005.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=daee68920660c1a22b8e0aa1f3885fdd" alt="" width="1010" height="241" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/005.png" />

**Step 1: Select File system type**

4. Select **Amazon FSx for Lustre** as your file system option type.

* Click "**Next**".

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/006.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=3c98a3bdaedf884c279c9813b5e328e5" alt="" width="1174" height="673" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/006.png" />

**Step 2 : Specify File system details**

5. In the **File system name** field - Enter **Whiz-fxs-File-system**

* Choose a Deployment and Storage class as **Scratch, SSD**
* Select Throughput as **200MB/s/TiB**
* Enter Storage capacity : **1.2 TB**

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/007.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=7600ba77c056fa44761cd3da26769405" alt="" width="777" height="580" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/007.png" />

6. In the Network & Security section, choose the **default VPC**, and Remove the default Security Group and select the **Fsx\_sg** , Select **subnet** of **us-east-1a** Availability Zone\*\*.\*\*

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/008.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=f125b0b1843ce1b7245742b585394d95" alt="" width="2392" height="682" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/008.png" />

7. Uncheck the Logging Optional (Log errors ,Log warnings) and Click **Next**.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/009.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=138ee1457072d35483a19508bb248b3c" alt="" width="1436" height="270" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/009.png" />

**Step 3 : Review and Create**

8. Click to **Create file system**

> **Note:** The FSx for Lustre file system takes 10 to 15 minutes from creation to becoming available.

#### Task 3: Launch an EC2 Instances

1. Ensure you are in the **US East (N. Virginia) us-east-1** Region to begin launching an EC2 instance in the Amazon cloud.

2. Navigate to **EC2** by clicking on the **Services** menu in the top, then click on **EC2** in the **Compute** section.

3. Click on the **Instances** option on the left panel, and then click on the **Launch Instances** button.

4. Name: Enter **EC2Server**

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/010.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=3cee9493f9520b4e06cc0e91b0216a63" alt="" width="1600" height="245" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/010.png" />

5. Select **Amazon Linux 2023 AMI** from the dropdown.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/011.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=ebb580da63dafd716003d1eec982fb24" alt="" width="1215" height="652" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/011.png" />

> **Note:** if there are two AMI's present for Amazon Linux 2o23 kernel-6.1 AMI.

6. An instance type in AWS refers to a virtual server configuration that determines the computing resources, such as CPU, memory, and storage, available to an instance. It is the basic building block for creating an EC2 instance in the AWS cloud.

* For Instance Type: Select **t3.micro**

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/012.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=8e6f20c8cf6f55c7c004b8dc5af549ba" alt="" width="923" height="142" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/012.png" />

> **Note:** t3.micro is an instance type in AWS that comes with 2 vCPU, and 1GB memory and is suitable for low-traffic web servers, small development environments, and other lightweight applications.

7. AWS key pair is a secure pair of keys used for login and access to EC2 instances. It includes a public key placed on the instance and a private key kept on the user's local computer, used for authentication to prevent unauthorized access.

* For **Key pair (login)**: Select **Create a new key pair** Button
* Key pair name: **WhizKey**
* Key pair type: **RSA**
* Private key file format: **.pem**

8. Click the **Edit** button in the network settings.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/013.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=ee0b3f357748035628912f5df5bafba3" alt="" width="921" height="502" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/013.png" />

* Select the **default VPC** and a subnet in the **us-east-1** region.
* Enable '**Auto-assign Public IP**', Select **Existing** **Security Group**, Select **FSx\_sg**, and leave all other settings as default.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/014.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=91e9569aeef0dcad59c20d3a51a7a7d1" alt="" width="1800" height="1070" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/014.png" />

9. At the top right, set the Number of instances to **2**, then click **Launch instance.**

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/015.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=fcffdee3bd4b424521c083137c82f40b" alt="" width="1032" height="1430" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/015.png" />

10. After creating the EC2 instances, rename the first instance from **EC2server** to ‘**EC2server-1**' and the second instance from '**EC2server**' to '**EC2server-2**'.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/016.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=74a29d1adc7e9cef3e8e816b6477fef7" alt="" width="1600" height="223" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/016.png" />

#### Task 4: Mount FSx for Lustre on EC2

1. Use **EC2 Instance Connect** to access and establish a connection between EC2Server-1 and EC2Server-2 via the browser.

> **Note :** Make sure to connect both **EC2Server-1** and **EC2Server-2** in separate browser, as below we have shown screenshot for EC2Server-1 alone. Ignore the Error message which pops up!

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/017.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=a181fe4f960d0cbedfc8143976da90af" alt="" width="1600" height="340" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/017.png" />

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/018.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=d53a342fa6116bfa3e5185174c662e06" alt="" width="1450" height="611" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/018.png" />

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/019.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=5c093f65c2139cefcf5faf2c9a5c66cf" alt="" width="625" height="685" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/019.png" />

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/020.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=2b8fa51d35db1bd8788d78238e52c86f" alt="" width="617" height="687" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/020.png" />

2. On **Both EC2 instances**, Run this commands.

```
sudo dnf install -y lustre-client
```

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/021.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=75d70f38d54103f6f51ebc7b33b6cae8" alt="" width="1600" height="698" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/021.png" />

3. Go to the **FSx file systems** page, select the file system we recently created, then click **Attach** to **copy** the mount commands.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/022.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=2b91978ebadf8544a29e8d39fbe1eaff" alt="" width="1169" height="336" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/022.png" />

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/023.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=e2a1e5c10f8252ec9ea83baa184ecece" alt="" width="615" height="707" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/023.png" />

4. Run the mount commands on both EC2 instances.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/024.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=6739a80d28aea68e6fcfd8b4ba83a042" alt="" width="1600" height="69" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/024.png" />

5. Create a text file on **EC2-Server-1**

```
sudo nano /fsx/test.txt
```

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/025.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=13d6aac0f325ab540ac9327ea605d0ea" alt="" width="1378" height="1526" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/025.png" />

* Type “**Hello from instance A**”

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/026.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=f6357a223fca04dcfb8f39652f0ea769" alt="" width="1600" height="1338" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/026.png" />

5. Save and exit the file .

* Press “**CTRL + X**”   to save. Press “**Y**”
* Press **Enter** to confirm the file name.

6. Open EC2-Server-2, run the command, and you should see the message: 'Hello from Instance A'.

```
sudo cat  /fsx/test.txt
```

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/027.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=6201503d48295169374f7e48f30d6801" alt="" width="1360" height="1540" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/027.png" />

> ##### Do You Know ?
>
> Amazon FSx for Lustre can deliver sub-millisecond latencies and throughput of hundreds of gigabytes per second. It’s widely used in fields like genomics, financial modeling, and media rendering where fast data access is critical. FSx Lustre can also transparently link to Amazon S3, allowing seamless data transfer between cloud storage and high-performance compute workloads.

#### Task 5: Delete Fxs file System

1. Go to the Amazon FSx console, select the '**Whiz-fxs-File-system**', then click 'Actions' and choose '**Delete file system**'.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/029.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=4c53fe8cf35d95e0cc80c559efbff5e4" alt="" width="1600" height="902" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/029.png" />

2. Choose '**No**' for creating a final backup, check the acknowledgment box, paste the file system ID into the field, and click '**Delete file system**'.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/O-gZIFgd1R7O2zWY/images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/030.png?fit=max&auto=format&n=O-gZIFgd1R7O2zWY&q=85&s=add2bd4994a434769e57ca1f98a531c5" alt="" width="1600" height="1084" data-path="images/labs/configuring-amazon-fsx-for-lustre-with-ec2-instances-for-shared-high-performance/030.png" />

### Completion and Conclusion

1. You successfully created an Amazon FSx for Lustre file system with 1.2 TB capacity.
2. You successfully launched and configured EC2 instances.
3. You successfully mounted the FSx Lustre file system on the EC2 instances.
4. You successfully created and read files on the EC2 instances using the shared FSx Lustre storage.

### End Lab

1. Sign out of AWS Account.
2. You have successfully completed the lab.
3. Once you completed the steps, click on **End Lab** from your IP Lab Portal and wait till the process gets completed.

## What gets checked

When you press **Check my work**, the platform verifies each of these:

* **Validate EC2 Instance Type t3.micro** — Check whether the EC2 instance type is t3.micro.
* **Check EC2 Instance Public IP** — Check whether the EC2 instance has a public IP address assigned.

## Related help

* [FAQs and Troubleshooting](/aws-saa/support/faqs-and-troubleshooting)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.