

# NVIDIA drivers for your Amazon EC2 instance
<a name="install-nvidia-driver"></a>

An instance with an attached NVIDIA GPU, such as a P- or G- series instance types, must have the appropriate NVIDIA driver installed. Depending on the instance type, you can either download a public NVIDIA driver, download a driver from Amazon S3 that is available only to AWS customers, or use an AWS AMI with the driver pre-installed.

To install AMD drivers on an instance with an attached AMD GPU, such as a G4ad instance, see [AMD drivers](install-amd-driver.md) instead.

**Topics**
+ [

## Types of NVIDIA drivers
](#nvidia-driver-types)
+ [

## Available drivers by instance type
](#nvidia-driver-instance-type)
+ [

## Installation options
](#nvidia-installation-options)
+ [

# Use AMIs that include NVIDIA drivers
](preinstalled-nvidia-driver.md)
+ [

# Install NVIDIA public drivers
](public-nvidia-driver.md)
+ [

# Install NVIDIA GRID drivers (G7e, G6, Gr6, G6e, G6f, Gr6f, G5, G4dn, and G3 instances)
](nvidia-GRID-driver.md)
+ [

# Install NVIDIA gaming drivers (G7e, G6, G6e, G5, and G4dn instances)
](nvidia-gaming-driver.md)

## Types of NVIDIA drivers
<a name="nvidia-driver-types"></a>

The following are the main types of NVIDIA drivers that can be used with GPU-based instances.

Tesla drivers  
These drivers are intended primarily for compute workloads, which use GPUs for computational tasks such as parallelized floating-point calculations for machine learning and fast Fourier transforms for high performance computing applications.

GRID drivers  
These drivers are certified to provide optimal performance for professional visualization applications that render content such as 3D models or high-resolution videos. You can configure GRID drivers to support two modes. Quadro Virtual Workstations provide access to four 4K displays per GPU. GRID vApps provide RDSH App hosting capabilities.

Gaming drivers  
These drivers contain optimizations for gaming and are updated frequently to provide performance enhancements. They support a single 4K display per GPU.

**Configured mode**  
On Windows, the Tesla drivers are configured to run in Tesla Compute Cluster (TCC) mode. The GRID and gaming drivers are configured to run in Windows Display Driver Model (WDDM) mode. In TCC mode, the card is dedicated to compute workloads. In WDDM mode, the card supports both compute and graphics workloads.

**NVIDIA control panel**  
The NVIDIA control panel is supported with GRID and Gaming drivers. It is not supported with Tesla drivers.

**Supported APIs for Tesla, GRID, and gaming drivers**
+ OpenCL, OpenGL, and Vulkan
+ NVIDIA CUDA and related libraries (for example, cuDNN, TensorRT, nvJPEG, and cuBLAS)
+ NVENC for video encoding and NVDEC for video decoding
+ Windows-only APIs: DirectX, Direct2D, DirectX Video Acceleration, DirectX Raytracing

## Available drivers by instance type
<a name="nvidia-driver-instance-type"></a>

The following table summarizes the supported NVIDIA drivers for each GPU instance type.


| Instance type | Tesla driver | GRID driver | Gaming driver | 
| --- | --- | --- | --- | 
| G3 | Yes | Yes | No | 
| G4dn | Yes | Yes | Yes | 
| G5 | Yes | Yes | Yes | 
| G5g | Yes ¹ | No | No | 
| G6 | Yes | Yes | Yes | 
| G6e | Yes | Yes | Yes | 
| G6f | No | Yes | No | 
| Gr6 | Yes | Yes | No | 
| Gr6f | No | Yes | No | 
| G7e | Yes | Yes | Yes | 
| P2 | Yes | No | No | 
| P3 | Yes | No | No | 
| P4d | Yes | No | No | 
| P4de | Yes | No | No | 
| P5 | Yes | No | No | 
| P5e | Yes | No | No | 
| P5en | Yes | No | No | 
| P6-B200 | Yes | No | No | 
| P6e-GB200 | Yes | No | No | 
| P6-B300 | Yes | No | No | 

¹ This Tesla driver also supports optimized graphics applications specific to the ARM64 platform

## Installation options
<a name="nvidia-installation-options"></a>

Use one of the following options to get the NVIDIA drivers required for your GPU instance.

**Options**

1. [Use AMIs that include NVIDIA drivers](preinstalled-nvidia-driver.md)

1. [Install NVIDIA public drivers](public-nvidia-driver.md)

1. [Install NVIDIA GRID drivers (G7e, G6, Gr6, G6e, G6f, Gr6f, G5, G4dn, and G3 instances)](nvidia-GRID-driver.md)

1. [Install NVIDIA gaming drivers (G7e, G6, G6e, G5, and G4dn instances)](nvidia-gaming-driver.md)

# Use AMIs that include NVIDIA drivers
<a name="preinstalled-nvidia-driver"></a>

AWS and NVIDIA offer different Amazon Machine Images (AMIs) that come with the NVIDIA drivers installed.
+ [Marketplace offerings with the Tesla public driver](https://aws.amazon.com/marketplace/search/results?page=1&filters=VendorId&VendorId=e6a5002c-6dd0-4d1e-8196-0a1d1857229b%2Cc568fe05-e33b-411c-b0ab-047218431da9&searchTerms=tesla+driver)
+ [Marketplace offerings with the GRID driver](https://aws.amazon.com/marketplace/search/results?&searchTerms=NVIDIA+quadro)
+ [Marketplace offerings with the Gaming driver](https://aws.amazon.com/marketplace/search/results?searchTerms=NVIDIA+gaming)

To review considerations that are dependent on your operating system (OS) platform, choose the tab that applies to your AMI.

------
#### [ Linux ]

To update the driver version installed using one of these AMIs, you must uninstall the NVIDIA packages from your instance to avoid version conflicts. Use this command to uninstall the NVIDIA packages:

```
[ec2-user ~]$ sudo yum erase nvidia cuda
```

The CUDA toolkit package has dependencies on the NVIDIA drivers. Uninstalling the NVIDIA packages erases the CUDA toolkit. You must reinstall the CUDA toolkit after installing the NVIDIA driver.

------
#### [ Windows ]

If you create a custom Windows AMI using one of the AWS Marketplace offerings, the AMI must be a standardized image created with Windows Sysprep to ensure that the GRID driver works. For more information, see [Create an Amazon EC2 AMI using Windows Sysprep](ami-create-win-sysprep.md).

------

# Install NVIDIA public drivers
<a name="public-nvidia-driver"></a>

If the AWS Marketplace AMIs described in [Use AMIs that include NVIDIA drivers](preinstalled-nvidia-driver.md) don't fit your use case, you can install the public drivers and bring your own license. Installation options include the following:
+ [Option 1: Driver-only install](#public-nvidia-driver-only-install)
+ [Option 2: Install with the CUDA toolkit](#public-nvidia-driver-cuda-install) (recommended for Linux distributions)

 

**P6-B200 and P6-B300 instance type considerations**  
The P6-B200 and P6-B300 platforms are unique in that they expose Mellanox ConnectX network interface cards (NICs) to the instance as PCIe devices. These NICs do not act as typical network interfaces but instead function as NVSwitch bridges providing a control path to initialize and configure the NVFabric, which is the NVLink topology of the GPU interconnect.

To fully initialize the system, the NVIDIA Fabric Manager must configure `NVFabric` and establish the NVSwitch topology. This enables InfiniBand kernel modules to communicate with the Mellanox ConnectX NICs.

NVIDIA Fabric Manager is included in the CUDA toolkit. We recommend [Option 2: Install with the CUDA toolkit](#public-nvidia-driver-cuda-install) for this instance type.

## Option 1: Driver-only install
<a name="public-nvidia-driver-only-install"></a>

To install a specific driver, log on to your instance and download the 64-bit NVIDIA public driver for the instance type from [ http://www.nvidia.com/Download/Find.aspx](http://www.nvidia.com/Download/Find.aspx). For **Product Type**, **Product Series**, and **Product**, use the options shown in the following table.

Then follow the **Local Repository Installation** instructions in the [ NVIDIA Driver Installation Guide](https://docs.nvidia.com/datacenter/tesla/driver-installation-guide/index.html).

**Note**  
P6-B200 and P6-B300 instance types require installation and configuration of additional packages that come bundled with the NVIDIA CUDA Toolkit. For more information, see instructions for your Linux distribution in [Option 2: Install with the CUDA toolkit](#public-nvidia-driver-cuda-install).


| Instance | Product type | Product series | Product | Minimum driver version | 
| --- | --- | --- | --- | --- | 
| G3 | Tesla | M-Class | M60 | -- | 
| G4dn | Tesla | T-Series | T4 | -- | 
| G5 | Tesla | A-Series | A10 | 470.00 or later | 
| G5g1 | Tesla | T-Series | T4G | 470.82.01 or later | 
| G6 | Tesla | L-Series | L4 | 525.0 or later | 
| G6e | Tesla | L-Series | L40S | 535.0 or later | 
| Gr6 | Tesla | L-Series | L4 | 525.0 or later | 
| G7e | Tesla | RTX series | RTX PRO 6000 Blackwell | 575.0 or later | 
| P2 | Tesla | K-Series | K80 | -- | 
| P3 | Tesla | V-Series | V100 | -- | 
| P4d | Tesla | A-Series | A100 | -- | 
| P4de | Tesla | A-Series | A100 | -- | 
| P5 | Tesla | H-Series | H100 | 530 or later | 
| P5e | Tesla | H-Series | H200 | 550 or later | 
| P5en | Tesla | H-Series | H200 | 550 or later | 
| P6-B2002 | Tesla | HGX-Series | B200 | 570 or later | 
| P6e-GB200 | Tesla | HGX-Series | B200 | 570 or later | 
| P6-B3002 | Tesla | HGX-Series | B300 | 580 or later | 

1 The operating system for G5g instances is Linux aarch64.

2 For P6-B200 and P6-B300 instance types, there are additional installation requirements to configure NVIDIA Fabric Manager.

## Option 2: Install with the CUDA toolkit
<a name="public-nvidia-driver-cuda-install"></a>

Install instructions vary slightly by operating system. To install public drivers on your instance with the NVIDIA CUDA toolkit, follow the instructions for your instance operating system. For instance operating systems that aren't shown here, follow the instructions for your operating system and instance type architecture on the NVIDIA Developer website. For more information, see [CUDA Toolkit Downloads](https://developer.nvidia.com/cuda-downloads).

For instance type architecture or other specifications, see the [Accelerated computing](https://docs.aws.amazon.com/ec2/latest/instancetypes/ac.html) specifications in the *Amazon EC2 Instance Types* reference.

### Amazon Linux 2023
<a name="nvidia-public-install-driver-al2023"></a>

This section covers an NVIDIA CUDA toolkit install on an Amazon Linux 2023 instance. The command examples in this section are based on an `x86_64` architecture.

For `arm64-sbsa` commands, see [CUDA Toolkit Downloads](https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=arm64-sbsa) and select the options that apply to your distribution. Instructions appear after you've made your final selection.

**Prerequisite**  
Before installing the toolkit and drivers, run the following command to ensure that you have the correct version of the kernel headers and development packages.

```
[ec2-user ~]$ sudo dnf install kernel-devel-$(uname -r) kernel-headers-$(uname -r) -y
```

**Download the toolkit and drivers**  
Choose the type of installation to use for your instance, and follow the associated steps.

------
#### [ RPM local installation ]

You can follow these instructions to download the CUDA toolkit installer repository bundle to your instance, then extract and register the specified bundle.

To view instructions on the NVIDIA developer website, see [CUDA Toolkit Downloads](https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Amazon-Linux&target_version=2023&target_type=rpm_local).

```
[ec2-user ~]$ wget https://developer.download.nvidia.com/compute/cuda/13.0.0/local_installers/cuda-repo-amzn2023-13-0-local-13.0.0_580.65.06-1.x86_64.rpm
[ec2-user ~]$ sudo rpm -i cuda-repo-amzn2023-13-0-local-13.0.0_580.65.06-1.x86_64.rpm
```

------
#### [ RPM network installation ]

You can follow these instructions to register the CUDA repository with the package manager on your instance. When you run the install steps, the package manager downloads only the packages that are required.

To view instructions on the NVIDIA developer website, see [CUDA Toolkit Downloads](https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Amazon-Linux&target_version=2023&target_type=rpm_network).

```
[ec2-user ~]$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
[ec2-user ~]$ sudo dpkg -i cuda-keyring_1.1-1_all.deb
```

------

Remaining steps are the same for both local and network installation.

1. Complete the CUDA toolkit install

   ```
   [ec2-user ~]$ sudo dnf clean all
   [ec2-user ~]$ sudo dnf install cuda-toolkit -y
   ```

1. Install the open kernel module variant of the driver

   ```
   [ec2-user ~]$ sudo dnf module install nvidia-driver:open-dkms -y
   ```

1. Install GPUDirect Storage and Fabric Manager

   ```
   [ec2-user ~]$ sudo dnf install nvidia-gds -y
   [ec2-user ~]$ sudo dnf install nvidia-fabric-manager -y
   ```

1. Enable Fabric Manager and driver persistence

   ```
   [ec2-user ~]$ sudo systemctl enable nvidia-fabricmanager
   [ec2-user ~]$ sudo systemctl enable nvidia-persistenced
   ```

1. (*P6-B200 and P6-B300 only*) These instance types require installation and configuration of additional packages that come bundled with the NVIDIA CUDA Toolkit.

   1. Install NVIDIA Link Subnet Manager and `ibstat`.

      ```
      [ec2-user ~]$ sudo dnf install nvlink5
      ```

   1. Enable automatic loading of the Infiniband module on startup.

      ```
      [ec2-user ~]$ echo "ib_umad" | sudo tee -a /etc/modules-load.d/modules.conf
      ```

1. Reboot the instance

   ```
   [ec2-user ~]$ sudo reboot
   ```

### Ubuntu 24.04
<a name="nvidia-public-install-driver-ubuntu2024"></a>

This section covers an NVIDIA CUDA toolkit install on an Ubuntu 24.04 instance. The command examples in this section are based on an `x86_64` architecture.

For `arm64-sbsa` commands, see [CUDA Toolkit Downloads](https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=arm64-sbsa) and select the options that apply to your distribution. Instructions appear after you've made your final selection.

**Prerequisite**  
Before installing the toolkit and drivers, run the following command to ensure that you have the correct version of the kernel headers and development packages.

```
$ apt install linux-headers-$(uname -r)
```

**Download the toolkit and drivers**  
Choose the type of installation to use for your instance, and follow the associated steps.

------
#### [ RPM local installation ]

You can follow these instructions to download the CUDA toolkit installer repository bundle to your instance, then extract and register the specified bundle.

To view instructions on the NVIDIA developer website, see [CUDA Toolkit Downloads](https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=24.04&target_type=deb_local).

```
$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-ubuntu2404.pin
$ sudo mv cuda-ubuntu2404.pin /etc/apt/preferences.d/cuda-repository-pin-600
$ wget https://developer.download.nvidia.com/compute/cuda/13.0.0/local_installers/cuda-repo-ubuntu2404-13-0-local_13.0.0-580.65.06-1_amd64.deb
$ sudo dpkg -i cuda-repo-ubuntu2404-13-0-local_13.0.0-580.65.06-1_amd64.deb
$ sudo cp /var/cuda-repo-ubuntu2404-13-0-local/cuda-*-keyring.gpg /usr/share/keyrings/
```

------
#### [ RPM network installation ]

You can follow these instructions to register the CUDA repository with the package manager on your instance. When you run the install steps, the package manager downloads only the packages that are required.

To view instructions on the NVIDIA developer website, see [CUDA Toolkit Downloads](https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=24.04&target_type=deb_network).

```
$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
$ sudo dpkg -i cuda-keyring_1.1-1_all.deb
```

------

Remaining steps are the same for both local and network installation.

1. Complete the CUDA toolkit install

   ```
   $ sudo apt update
   $ sudo apt install cuda-toolkit -y
   ```

1. Install the open kernel module variant of the driver

   ```
   $ sudo apt install nvidia-open -y
   ```

1. Install GPUDirect Storage and Fabric Manager

   ```
   $ sudo apt install nvidia-gds -y
   $ sudo apt install nvidia-fabricmanager -y
   ```

1. Enable Fabric Manager and driver persistence

   ```
   $ sudo systemctl enable nvidia-fabricmanager
   $ sudo systemctl enable nvidia-persistenced
   ```

1. (*P6-B200 and P6-B300 only*) These instance types require installation and configuration of additional packages that come bundled with the NVIDIA CUDA Toolkit.

   1. Install the latest InfiniBand-specific device driver and diagnostic utilities.

      ```
      $ sudo apt install linux-modules-extra-$(uname -r) -y
      $ sudo apt install infiniband-diags -y
      ```

   1. Install NVIDIA Link Subnet Manager.

      ```
      $ sudo apt install nvlsm -y
      ```

1. Reboot the instance

   ```
   sudo reboot
   ```

1. Update your path and add the following environment variable.

   ```
   $ export PATH=${PATH}:/usr/local/cuda-13.0/bin
   $ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda-13.0/lib64
   ```

### Windows operating systems
<a name="nvidia-public-install-driver-windows"></a>

To install the NVIDIA driver on Windows, follow these steps:

1. Open the folder where you downloaded the driver and launch the installation file. Follow the instructions to install the driver and reboot your instance as required.

1. Disable the display adapter named **Microsoft Basic Display Adapter** that is marked with a warning icon using Device Manager. Install these Windows features: **Media Foundation** and **Quality Windows Audio Video Experience**.
**Important**  
Don't disable the display adapter named **Microsoft Remote Display Adapter**. If **Microsoft Remote Display Adapter** is disabled your connection might be interrupted and attempts to connect to the instance after it has rebooted might fail.

1. Check Device Manager to verify that the GPU is working correctly.

1. To achieve the best performance from your GPU, complete the optimization steps in [Optimize GPU settings on Amazon EC2 instances](optimize_gpu.md).

# Install NVIDIA GRID drivers (G7e, G6, Gr6, G6e, G6f, Gr6f, G5, G4dn, and G3 instances)
<a name="nvidia-GRID-driver"></a>

These downloads are available to AWS customers only. By downloading, in order to adhere to requirements of the AWS solution referred to in the NVIDIA GRID Cloud End User License Agreement (EULA), you agree to use the downloaded software only to develop AMIs for use with the NVIDIA L4, NVIDIA L40S, NVIDIA A10G, NVIDIA Tesla T4, or NVIDIA Tesla M60 hardware. You can use the GRID drivers to both create and use AMIs within the AWS environment. Upon installation of the software, you are bound by the terms of the [NVIDIA GRID Cloud End User License Agreement](https://aws-nvidia-license-agreement.s3.amazonaws.com/NvidiaGridAWSUserLicenseAgreement.DOCX). For information about the version of the NVIDIA GRID driver for your operating system, see the [NVIDIA Virtual GPU (vGPU) Software](https://docs.nvidia.com/vgpu/) on the NVIDIA website.

**Considerations**
+ G7e instances require GRID 19.1 or later for Linux and 19.3 (581.192) or later for Windows.
+ G6f and Gr6f instances require GRID 18.4 or later.
+ G6e instances require GRID 17.4 or later.
+ G6 and Gr6 instances require GRID 17.1 or later.
+ G5 instances require GRID 13.1 or later (or GRID 12.4 or later).
+ G3 instances require AWS provided DNS resolution for GRID licensing to work.
+ [IMDSv2](configuring-instance-metadata-service.md) is only supported with NVIDIA driver version 14.0 or greater.
+ For Windows instances, if you launch your instance from a custom Windows AMI, the AMI must be a standardized image created with Windows Sysprep to ensure that the GRID driver works. For more information, see [Create an Amazon EC2 AMI using Windows Sysprep](ami-create-win-sysprep.md).
+ GRID 17.0 and later do not support Windows Server 2019.
+ GRID 14.2 and later do not support Windows Server 2016.
+ GRID 17.0 and later is not supported with G3 instances.
+ For Linux instances, you might need to install or update packages, such as gcc, if the NVIDIA installer fails with an error message. The specifics depend on the versions of the operating system and the kernel. For more information, see the NVIDIA Enterprise Support Portal.

**Prerequisites**
+ (Linux) Verify that the AWS CLI is installed on your instance and configured with default credentials. For more information, see [Installing the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) in the *AWS Command Line Interface User Guide*.
+ (Windows) Configure default credentials for the AWS Tools for Windows PowerShell on your instance. For more information, see [Getting started with the AWS Tools for Windows PowerShell](https://docs.aws.amazon.com/powershell/latest/userguide/pstools-getting-started.html) in the *AWS Tools for PowerShell User Guide*.
+ Your user or role must have the permissions granted that contains the **AmazonS3ReadOnlyAccess** policy.

## Amazon Linux 2023
<a name="nvidia-grid-amazon-linux"></a>

**To install the NVIDIA GRID driver on your instance**

1. Connect to your instance. Update your package cache and get the package updates for your instance.

   ```
   [ec2-user ~]$ sudo dnf update -y
   ```

1. Install **gcc** and **make**, if they are not already installed.

   ```
   [ec2-user ~]$ sudo dnf install gcc make
   ```

1. Reboot your instance to load the latest kernel version.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. Reconnect to your instance after it has rebooted.

1. Install the kernel headers packages.

   ```
   [ec2-user ~]$ sudo dnf install -y kernel-devel kernel-modules-extra
   ```

1. Download the GRID driver installation utility using the following command:

   ```
   [ec2-user ~]$ aws s3 cp --recursive s3://ec2-linux-nvidia-drivers/latest/ .
   ```

   Multiple versions of the GRID driver are stored in this bucket. You can see all of the available versions using the following command.

   ```
   [ec2-user ~]$ aws s3 ls --recursive s3://ec2-linux-nvidia-drivers/
   ```

1. Add permissions to run the driver installation utility using the following command.

   ```
   [ec2-user ~]$ chmod +x NVIDIA-Linux-x86_64*.run
   ```

1. Run the self-install script as follows to install the GRID driver that you downloaded. For example:

   ```
   [ec2-user ~]$ sudo /bin/sh ./NVIDIA-Linux-x86_64*.run
   ```

   When prompted, accept the license agreement and specify the installation options as required (you can accept the default options).

1. Confirm that the driver is functional. The response for the following command lists the installed version of the NVIDIA driver and details about the GPUs.

   ```
   [ec2-user ~]$ nvidia-smi -q | head
   ```

1. If you are using NVIDIA vGPU software version 14.x or greater on the G4dn, G5, or G5g instances, disable GSP with the following commands. For more information about why this is required, see the [NVIDIA documentation](https://docs.nvidia.com/vgpu/latest/grid-vgpu-user-guide/index.html#disabling-gsp).

   ```
   [ec2-user ~]$ sudo touch /etc/modprobe.d/nvidia.conf
   ```

   ```
   [ec2-user ~]$ echo "options nvidia NVreg_EnableGpuFirmware=0" | sudo tee --append /etc/modprobe.d/nvidia.conf
   ```

1. Reboot the instance.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. (Optional) Depending on your use case, you might complete the following optional steps. If you do not require this functionality, do not complete these steps.

   1. To help take advantage of the four displays of up to 4K resolution, set up the high-performance display protocol [Amazon DCV](https://docs.aws.amazon.com/dcv/).

   1. NVIDIA Quadro Virtual Workstation mode is enabled by default. To activate GRID Virtual Applications for RDSH Application hosting capabilities, complete the GRID Virtual Application activation steps in [Activate NVIDIA GRID Virtual Applications on your Amazon EC2 GPU-based instances](activate_grid.md).

## Amazon Linux 2
<a name="nvidia-grid-amazon-linux-2"></a>

**To install the NVIDIA GRID driver on your instance**

1. Connect to your instance. Update your package cache and get the package updates for your instance.

   ```
   [ec2-user ~]$ sudo yum update -y
   ```

1. Install **gcc** and **make**, if they are not already installed.

   ```
   [ec2-user ~]$ sudo yum install gcc make
   ```

1. Reboot your instance to load the latest kernel version.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. Reconnect to your instance after it has rebooted.

1. Install the kernel headers package for the version of the kernel that is running.

   ```
   [ec2-user ~]$ sudo yum install -y kernel-devel-$(uname -r)
   ```

1. Download the GRID driver installation utility using the following command:

   ```
   [ec2-user ~]$ aws s3 cp --recursive s3://ec2-linux-nvidia-drivers/latest/ .
   ```

   Multiple versions of the GRID driver are stored in this bucket. You can see all of the available versions using the following command.

   ```
   [ec2-user ~]$ aws s3 ls --recursive s3://ec2-linux-nvidia-drivers/
   ```

1. Add permissions to run the driver installation utility using the following command.

   ```
   [ec2-user ~]$ chmod +x NVIDIA-Linux-x86_64*.run
   ```

1. Run the self-install script as follows to install the GRID driver that you downloaded. For example:

   ```
   [ec2-user ~]$ sudo /bin/sh ./NVIDIA-Linux-x86_64*.run
   ```

   If you are using Amazon Linux 2 with kernel version 5.10, use the following command to install the GRID driver.

   ```
   [ec2-user ~]$ sudo CC=/usr/bin/gcc10-cc ./NVIDIA-Linux-x86_64*.run
   ```

   When prompted, accept the license agreement and specify the installation options as required (you can accept the default options).

1. Confirm that the driver is functional. The response for the following command lists the installed version of the NVIDIA driver and details about the GPUs.

   ```
   [ec2-user ~]$ nvidia-smi -q | head
   ```

1. If you are using NVIDIA vGPU software version 14.x or greater on the G4dn, G5, or G5g instances, disable GSP with the following commands. For more information about why this is required, see the [NVIDIA documentation](https://docs.nvidia.com/vgpu/latest/grid-vgpu-user-guide/index.html#disabling-gsp).

   ```
   [ec2-user ~]$ sudo touch /etc/modprobe.d/nvidia.conf
   ```

   ```
   [ec2-user ~]$ echo "options nvidia NVreg_EnableGpuFirmware=0" | sudo tee --append /etc/modprobe.d/nvidia.conf
   ```

1. Reboot the instance.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. (Optional) Depending on your use case, you might complete the following optional steps. If you do not require this functionality, do not complete these steps.

   1. To help take advantage of the four displays of up to 4K resolution, set up the high-performance display protocol [Amazon DCV](https://docs.aws.amazon.com/dcv/).

   1. NVIDIA Quadro Virtual Workstation mode is enabled by default. To activate GRID Virtual Applications for RDSH Application hosting capabilities, complete the GRID Virtual Application activation steps in [Activate NVIDIA GRID Virtual Applications on your Amazon EC2 GPU-based instances](activate_grid.md).

## CentOS 7 and Red Hat Enterprise Linux 7
<a name="nvidia-grid-centos7-rhel7"></a>

**To install the NVIDIA GRID driver on your instance**

1. Connect to your instance. Update your package cache and get the package updates for your instance.

   ```
   [ec2-user ~]$ sudo yum update -y
   ```

1. Install **gcc** and **make**, if they are not already installed.

   ```
   [ec2-user ~]$ sudo yum install -y gcc make
   ```

1. Reboot your instance to load the latest kernel version.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. Reconnect to your instance after it has rebooted.

1. Install the kernel headers package for the version of the kernel that you are running.

   ```
   [ec2-user ~]$ sudo yum install -y kernel-devel-$(uname -r)
   ```

1. Disable the `nouveau` open source driver for NVIDIA graphics cards.

   1. Add `nouveau` to the `/etc/modprobe.d/blacklist.conf` blacklist file. Copy the following code block and paste it into a terminal.

      ```
      [ec2-user ~]$ cat << EOF | sudo tee --append /etc/modprobe.d/blacklist.conf
      blacklist vga16fb
      blacklist nouveau
      blacklist rivafb
      blacklist nvidiafb
      blacklist rivatv
      EOF
      ```

   1. Edit the `/etc/default/grub` file and add the following line:

      ```
      GRUB_CMDLINE_LINUX="rdblacklist=nouveau"
      ```

   1. Rebuild the Grub configuration.

      ```
      [ec2-user ~]$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
      ```

1. Download the GRID driver installation utility using the following command:

   ```
   [ec2-user ~]$ aws s3 cp --recursive s3://ec2-linux-nvidia-drivers/latest/ .
   ```

   Multiple versions of the GRID driver are stored in this bucket. You can see all of the available versions using the following command.

   ```
   [ec2-user ~]$ aws s3 ls --recursive s3://ec2-linux-nvidia-drivers/
   ```

1. Add permissions to run the driver installation utility using the following command.

   ```
   [ec2-user ~]$ chmod +x NVIDIA-Linux-x86_64*.run
   ```

1. Run the self-install script as follows to install the GRID driver that you downloaded. For example:

   ```
   [ec2-user ~]$ sudo /bin/sh ./NVIDIA-Linux-x86_64*.run
   ```

   When prompted, accept the license agreement and specify the installation options as required (you can accept the default options).

1. Confirm that the driver is functional. The response for the following command lists the installed version of the NVIDIA driver and details about the GPUs.

   ```
   [ec2-user ~]$ nvidia-smi -q | head
   ```

1. If you are using NVIDIA vGPU software version 14.x or greater on the G4dn, G5, or G5g instances, disable GSP with the following commands. For more information about why this is required, see the [NVIDIA documentation](https://docs.nvidia.com/vgpu/latest/grid-vgpu-user-guide/index.html#disabling-gsp).

   ```
   [ec2-user ~]$ sudo touch /etc/modprobe.d/nvidia.conf
   ```

   ```
   [ec2-user ~]$ echo "options nvidia NVreg_EnableGpuFirmware=0" | sudo tee --append /etc/modprobe.d/nvidia.conf
   ```

1. Reboot the instance.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. (Optional) Depending on your use case, you might complete the following optional steps. If you do not require this functionality, do not complete these steps.

   1. To help take advantage of the four displays of up to 4K resolution, set up the high-performance display protocol [Amazon DCV](https://docs.aws.amazon.com/dcv/).

   1. NVIDIA Quadro Virtual Workstation mode is enabled by default. To activate GRID Virtual Applications for RDSH Application hosting capabilities, complete the GRID Virtual Application activation steps in [Activate NVIDIA GRID Virtual Applications on your Amazon EC2 GPU-based instances](activate_grid.md).

   1. Install the GUI desktop/workstation package.

      ```
      [ec2-user ~]$ sudo yum groupinstall -y "Server with GUI"
      ```

## CentOS Stream 8 and Red Hat Enterprise Linux 8
<a name="nvidia-grid-centos8-rhel8"></a>

**To install the NVIDIA GRID driver on your instance**

1. Connect to your instance. Update your package cache and get the package updates for your instance.

   ```
   [ec2-user ~]$ sudo yum update -y
   ```

1. Install **gcc** and **make**, if they are not already installed.

   ```
   [ec2-user ~]$ sudo yum install -y gcc make
   ```

1. Reboot your instance to load the latest kernel version.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. Reconnect to your instance after it has rebooted.

1. Install the kernel headers package for the version of the kernel that you are running.

   ```
   [ec2-user ~]$ sudo dnf install -y elfutils-libelf-devel libglvnd-devel kernel-devel-$(uname -r)
   ```

1. Download the GRID driver installation utility using the following command:

   ```
   [ec2-user ~]$ aws s3 cp --recursive s3://ec2-linux-nvidia-drivers/latest/ .
   ```

   Multiple versions of the GRID driver are stored in this bucket. You can see all of the available versions using the following command.

   ```
   [ec2-user ~]$ aws s3 ls --recursive s3://ec2-linux-nvidia-drivers/
   ```

1. Add permissions to run the driver installation utility using the following command.

   ```
   [ec2-user ~]$ chmod +x NVIDIA-Linux-x86_64*.run
   ```

1. Run the self-install script as follows to install the GRID driver that you downloaded. For example:

   ```
   [ec2-user ~]$ sudo /bin/sh ./NVIDIA-Linux-x86_64*.run
   ```

   When prompted, accept the license agreement and specify the installation options as required (you can accept the default options).

1. Confirm that the driver is functional. The response for the following command lists the installed version of the NVIDIA driver and details about the GPUs.

   ```
   [ec2-user ~]$ nvidia-smi -q | head
   ```

1. If you are using NVIDIA vGPU software version 14.x or greater on the G4dn, G5, or G5g instances, disable GSP with the following commands. For more information about why this is required, see the [NVIDIA documentation](https://docs.nvidia.com/vgpu/latest/grid-vgpu-user-guide/index.html#disabling-gsp).

   ```
   [ec2-user ~]$ sudo touch /etc/modprobe.d/nvidia.conf
   ```

   ```
   [ec2-user ~]$ echo "options nvidia NVreg_EnableGpuFirmware=0" | sudo tee --append /etc/modprobe.d/nvidia.conf
   ```

1. Reboot the instance.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. (Optional) Depending on your use case, you might complete the following optional steps. If you do not require this functionality, do not complete these steps.

   1. To help take advantage of the four displays of up to 4K resolution, set up the high-performance display protocol [Amazon DCV](https://docs.aws.amazon.com/dcv/).

   1. NVIDIA Quadro Virtual Workstation mode is enabled by default. To activate GRID Virtual Applications for RDSH Application hosting capabilities, complete the GRID Virtual Application activation steps in [Activate NVIDIA GRID Virtual Applications on your Amazon EC2 GPU-based instances](activate_grid.md).

   1. Install the GUI workstation package.

      ```
      [ec2-user ~]$ sudo dnf groupinstall -y workstation
      ```

## Rocky Linux 8
<a name="nvidia-grid-rocky-linux-8"></a>

**To install the NVIDIA GRID driver on your Linux instance**

1. Connect to your instance. Update your package cache and get the package updates for your instance.

   ```
   [ec2-user ~]$ sudo yum update -y
   ```

1. Install **gcc** and **make**, if they are not already installed.

   ```
   [ec2-user ~]$ sudo yum install -y gcc make
   ```

1. Reboot your instance to load the latest kernel version.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. Reconnect to your instance after it has rebooted.

1. Install the kernel headers package for the version of the kernel that you are running.

   ```
   [ec2-user ~]$ sudo dnf install -y elfutils-libelf-devel libglvnd-devel kernel-devel-$(uname -r)
   ```

1. Download the GRID driver installation utility using the following command:

   ```
   [ec2-user ~]$ aws s3 cp --recursive s3://ec2-linux-nvidia-drivers/latest/ .
   ```

   Multiple versions of the GRID driver are stored in this bucket. You can see all of the available versions using the following command.

   ```
   [ec2-user ~]$ aws s3 ls --recursive s3://ec2-linux-nvidia-drivers/
   ```

1. Add permissions to run the driver installation utility using the following command.

   ```
   [ec2-user ~]$ chmod +x NVIDIA-Linux-x86_64*.run
   ```

1. Run the self-install script as follows to install the GRID driver that you downloaded. For example:

   ```
   [ec2-user ~]$ sudo /bin/sh ./NVIDIA-Linux-x86_64*.run
   ```

   When prompted, accept the license agreement and specify the installation options as required (you can accept the default options).

1. Confirm that the driver is functional. The response for the following command lists the installed version of the NVIDIA driver and details about the GPUs.

   ```
   [ec2-user ~]$ nvidia-smi -q | head
   ```

1. If you are using NVIDIA vGPU software version 14.x or greater on the G4dn, G5, or G5g instances, disable GSP with the following commands. For more information about why this is required, see the [NVIDIA documentation](https://docs.nvidia.com/vgpu/latest/grid-vgpu-user-guide/index.html#disabling-gsp).

   ```
   [ec2-user ~]$ sudo touch /etc/modprobe.d/nvidia.conf
   ```

   ```
   [ec2-user ~]$ echo "options nvidia NVreg_EnableGpuFirmware=0" | sudo tee --append /etc/modprobe.d/nvidia.conf
   ```

1. Reboot the instance.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. (Optional) Depending on your use case, you might complete the following optional steps. If you do not require this functionality, do not complete these steps.

   1. To help take advantage of the four displays of up to 4K resolution, set up the high-performance display protocol [Amazon DCV](https://docs.aws.amazon.com/dcv/).

   1. NVIDIA Quadro Virtual Workstation mode is enabled by default. To activate GRID Virtual Applications for RDSH Application hosting capabilities, complete the GRID Virtual Application activation steps in [Activate NVIDIA GRID Virtual Applications on your Amazon EC2 GPU-based instances](activate_grid.md).

## Ubuntu and Debian
<a name="nvidia-grid-ubuntu-debian"></a>

**To install the NVIDIA GRID driver on your instance**

1. Connect to your instance. Update your package cache and get the package updates for your instance.

   ```
   $ sudo apt-get update -y
   ```

1. Install **gcc** and **make**, if they are not already installed.

   ```
   $ sudo apt-get install -y gcc make
   ```

1. (Ubuntu) Upgrade the `linux-aws` package to receive the latest version.

   ```
   $ sudo apt-get upgrade -y linux-aws
   ```

   (Debian) Upgrade package to receive the latest version.

   ```
   $ sudo apt-get upgrade -y
   ```

1. Reboot your instance to load the latest kernel version.

   ```
   $ sudo reboot
   ```

1. Reconnect to your instance after it has rebooted.

1. Install the kernel headers package for the version of the kernel you are currently running.

   ```
   $ sudo apt-get install -y linux-headers-$(uname -r) linux-modules-extra-$(uname -r)
   ```

1. Disable the `nouveau` open source driver for NVIDIA graphics cards.

   1. Add `nouveau` to the `/etc/modprobe.d/blacklist.conf` blacklist file. Copy the following code block and paste it into a terminal.

      ```
      $ cat << EOF | sudo tee --append /etc/modprobe.d/blacklist.conf
      blacklist vga16fb
      blacklist nouveau
      blacklist rivafb
      blacklist nvidiafb
      blacklist rivatv
      EOF
      ```

   1. Edit the `/etc/default/grub` file and add the following line:

      ```
      GRUB_CMDLINE_LINUX="rdblacklist=nouveau"
      ```

   1. Rebuild the Grub configuration.

      ```
      $ sudo update-grub
      ```

1. Download the GRID driver installation utility using the following command:

   ```
   $ aws s3 cp --recursive s3://ec2-linux-nvidia-drivers/latest/ .
   ```

   Multiple versions of the GRID driver are stored in this bucket. You can see all of the available versions using the following command.

   ```
   $ aws s3 ls --recursive s3://ec2-linux-nvidia-drivers/
   ```

1. Add permissions to run the driver installation utility using the following command.

   ```
   $ chmod +x NVIDIA-Linux-x86_64*.run
   ```

1. Run the self-install script as follows to install the GRID driver that you downloaded. For example:

   ```
   $ sudo /bin/sh ./NVIDIA-Linux-x86_64*.run
   ```

   When prompted, accept the license agreement and specify the installation options as required (you can accept the default options).

1. Confirm that the driver is functional. The response for the following command lists the installed version of the NVIDIA driver and details about the GPUs.

   ```
   $ nvidia-smi -q | head
   ```

1. If you are using NVIDIA vGPU software version 14.x or greater on the G4dn, G5, or G5g instances, disable GSP with the following commands. For more information about why this is required, see the [NVIDIA documentation](https://docs.nvidia.com/vgpu/latest/grid-vgpu-user-guide/index.html#disabling-gsp).

   ```
   $ sudo touch /etc/modprobe.d/nvidia.conf
   ```

   ```
   $ echo "options nvidia NVreg_EnableGpuFirmware=0" | sudo tee --append /etc/modprobe.d/nvidia.conf
   ```

1. Reboot the instance.

   ```
   $ sudo reboot
   ```

1. (Optional) Depending on your use case, you might complete the following optional steps. If you do not require this functionality, do not complete these steps.

   1. To help take advantage of the four displays of up to 4K resolution, set up the high-performance display protocol [Amazon DCV](https://docs.aws.amazon.com/dcv/).

   1. NVIDIA Quadro Virtual Workstation mode is enabled by default. To activate GRID Virtual Applications for RDSH Application hosting capabilities, complete the GRID Virtual Application activation steps in [Activate NVIDIA GRID Virtual Applications on your Amazon EC2 GPU-based instances](activate_grid.md).

   1. Install the GUI desktop/workstation package.

      ```
      $ sudo apt-get install -y lightdm ubuntu-desktop
      ```

## Windows operating systems
<a name="nvidia-grid-windows"></a>

**To install the NVIDIA GRID driver on your Windows instance**

1. Connect to your Windows instance and open a PowerShell window.

1. Download the drivers and the [NVIDIA GRID Cloud End User License Agreement](https://aws-nvidia-license-agreement.s3.amazonaws.com/NvidiaGridAWSUserLicenseAgreement.DOCX) from Amazon S3 to your desktop using the following PowerShell commands.

   ```
   $Bucket = "ec2-windows-nvidia-drivers"
   $KeyPrefix = "latest"
   $LocalPath = "$home\Desktop\NVIDIA"
   $Objects = Get-S3Object -BucketName $Bucket -KeyPrefix $KeyPrefix -Region us-east-1
   foreach ($Object in $Objects) {
   $LocalFileName = $Object.Key
   if ($LocalFileName -ne '' -and $Object.Size -ne 0) {
   $LocalFilePath = Join-Path $LocalPath $LocalFileName
   Copy-S3Object -BucketName $Bucket -Key $Object.Key -LocalFile $LocalFilePath -Region us-east-1
   }
   }
   ```

   Multiple versions of the NVIDIA GRID driver are stored in this bucket. You can download all of the available Windows versions in the bucket by removing the `-KeyPrefix $KeyPrefix` option. For information about the version of the NVIDIA GRID driver for your operating system, see the [NVIDIA Virtual GPU (vGPU) Software](https://docs.nvidia.com/vgpu/) on the NVIDIA website.

   Starting with GRID version 11.0, you can use the drivers under `latest` for both G3 and G4dn instances. We will not add versions later than 11.0 to `g4/latest`, but will keep version 11.0 and the earlier versions specific to G4dn under `g4/latest`.

   G5 instances require GRID 13.1 or later (or GRID 12.4 or later).

1. Navigate to the desktop and double-click the installation file to launch it (choose the driver version that corresponds to your instance OS version). Follow the instructions to install the driver and reboot your instance as required. To verify that the GPU is working properly, check Device Manager.

1. (Optional) Use the following command to disable the licensing page in the control panel to prevent users from accidentally changing the product type (NVIDIA GRID Virtual Workstation is enabled by default). For more information, see the [GRID Licensing User Guide](https://docs.nvidia.com/vgpu/4.6/grid-licensing-user-guide/index.html).

**PowerShell**  
Run the following PowerShell commands to create the registry value to disable the licensing page in the control panel. The AWS Tools for PowerShell in AWS Windows AMIs defaults to the 32-bit version and this command fails. Instead, use the 64-bit version of PowerShell included with the operating system.

   ```
   New-Item -Path "HKLM:\SOFTWARE\NVIDIA Corporation\Global" -Name GridLicensing
   New-ItemProperty -Path "HKLM:\SOFTWARE\NVIDIA Corporation\Global\GridLicensing" -Name "NvCplDisableManageLicensePage" -PropertyType "DWord" -Value "1"
   ```

**Command Prompt**  
Run the following registry command to create the registry value to disable the licensing page in the control panel. You can run it using the Command Prompt window or a 64-bit version of PowerShell.

   ```
   reg add "HKLM\SOFTWARE\NVIDIA Corporation\Global\GridLicensing" /v NvCplDisableManageLicensePage /t REG_DWORD /d 1
   ```

1. (Optional) Depending on your use case, you might complete the following optional steps. If you do not require this functionality, do not complete these steps.

   1. To help take advantage of the four displays of up to 4K resolution, set up the high-performance display protocol, [Amazon DCV](https://docs.aws.amazon.com/dcv/).

   1. NVIDIA Quadro Virtual Workstation mode is enabled by default. To activate GRID Virtual Applications for RDSH Application hosting capabilities, complete the GRID Virtual Application activation steps in [Activate NVIDIA GRID Virtual Applications on your Amazon EC2 GPU-based instances](activate_grid.md).

# Install NVIDIA gaming drivers (G7e, G6, G6e, G5, and G4dn instances)
<a name="nvidia-gaming-driver"></a>

These drivers are available to AWS customers only. By downloading them, you agree to use the downloaded software only to develop AMIs for use with the RTX PRO 6000 Blackwell, NVIDIA L4, NVIDIA L40S, NVIDIA A10G, NVIDIA Tesla T4, or NVIDIA Tesla M60 hardware. You can use the GRID drivers to both create and use AMIs within the AWS environment. Upon installation of the software, you are bound by the terms of the [NVIDIA GRID Cloud End User License Agreement](https://aws-nvidia-license-agreement.s3.amazonaws.com/NvidiaGridAWSUserLicenseAgreement.DOCX).

**Considerations**
+ G3 instances require AWS provided DNS resolution for GRID licensing to work.
+ [IMDSv2](configuring-instance-metadata-service.md) is only supported with NVIDIA driver version 495.x or greater. 

**Prerequisites**
+ (Linux) Verify that the AWS CLI is installed on your instance and configured with default credentials. For more information, see [Installing the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) in the *AWS Command Line Interface User Guide*.
+ Your user or role must have the permissions granted that contains the **AmazonS3ReadOnlyAccess** policy.

## Amazon Linux 2023
<a name="nvidia-gaming-amazon-linux"></a>

**To install the NVIDIA gaming driver on your instance**

1. Connect to your instance. Update your package cache and get the package updates for your instance.

   ```
   [ec2-user ~]$ sudo dnf update -y
   ```

1. Install **gcc** and **make**, if they are not already installed.

   ```
   [ec2-user ~]$ sudo dnf install gcc make
   ```

1. Reboot your instance to load the latest kernel version.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. Reconnect to your instance after it is rebooted.

1. Install the kernel headers packages.

   ```
   [ec2-user ~]$ sudo dnf install -y kernel-devel kernel-modules-extra kernel-devel-$(uname -r) kernel-headers-$(uname -r) dkms
   ```

1. Download the gaming driver installation utility using the following command:

   ```
   [ec2-user ~]$ aws s3 cp --recursive s3://nvidia-gaming/linux/latest/ .
   ```

   Multiple versions of the gaming driver are stored in this bucket. You can see all of the available versions using the following command:

   ```
   [ec2-user ~]$ aws s3 ls --recursive s3://nvidia-gaming/linux/
   ```

1. Extract the gaming driver installation utility from the downloaded `.zip` archive.

   ```
   [ec2-user ~]$ unzip latest-driver-name.zip -d nvidia-drivers
   ```

1. Add permissions to run the driver installation utility using the following command:

   ```
   [ec2-user ~]$ chmod +x nvidia-drivers/NVIDIA-Linux-x86_64*-grid.run
   ```

1. Run the installer using the following command:

   ```
   [ec2-user ~]$ sudo ./nvidia-drivers/NVIDIA-Linux-x86_64*.run
   ```

   When prompted, accept the license agreement and specify the installation options as required (you can accept the default options).

1. Use the following command to create the required configuration file.

   ```
   [ec2-user ~]$ cat << EOF | sudo tee -a /etc/nvidia/gridd.conf
   vGamingMarketplace=2
   EOF
   ```

1. Use the following command to download and rename the certification file.
   + For version 590.48 or later:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert_2026_03_02.cert"
     ```
   + For version 460.39 to 580.95:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCertLinux_2024_02_22.cert"
     ```
   + For version 440.68 to 445.48:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert-Linux_2020_04.cert"
     ```
   + For earlier versions:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert-Linux_2019_09.cert"
     ```

1. If you are using NVIDIA driver version 510.x or greater on the G4dn, G5, or G5g instances, disable GSP with the following commands. For more information about why this is required, see the [NVIDIA documentation](https://docs.nvidia.com/vgpu/latest/grid-vgpu-user-guide/index.html#disabling-gsp).

   ```
   [ec2-user ~]$ sudo touch /etc/modprobe.d/nvidia.conf
   ```

   ```
   [ec2-user ~]$ echo "options nvidia NVreg_EnableGpuFirmware=0" | sudo tee --append /etc/modprobe.d/nvidia.conf
   ```

1. Reboot the instance.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. Verify the NVIDIA Gaming license using the following command.

   ```
   [ec2-user ~]$ nvidia-smi.exe -q
   ```

   In the output, search for `vGPU Software Licensed Product`.

1. (Optional) To help take advantage of a single display of up to 4K resolution, set up the high-performance display protocol [Amazon DCV](https://docs.aws.amazon.com/dcv/).

## Amazon Linux 2
<a name="nvidia-gaming-amazon-linux-2"></a>

**To install the NVIDIA gaming driver on your instance**

1. Connect to your instance. Update your package cache and get the package updates for your instance.

   ```
   [ec2-user ~]$ sudo yum update -y
   ```

1. Install **gcc** and **make**, if they are not already installed.

   ```
   [ec2-user ~]$ sudo yum install gcc make
   ```

1. Reboot your instance to load the latest kernel version.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. Reconnect to your instance after it is rebooted.

1. Install the kernel headers package for the version of the kernel you are currently running.

   ```
   [ec2-user ~]$ sudo yum install -y kernel-devel-$(uname -r)
   ```

1. Download the gaming driver installation utility using the following command:

   ```
   [ec2-user ~]$ aws s3 cp --recursive s3://nvidia-gaming/linux/latest/ .
   ```

   Multiple versions of the gaming driver are stored in this bucket. You can see all of the available versions using the following command:

   ```
   [ec2-user ~]$ aws s3 ls --recursive s3://nvidia-gaming/linux/
   ```

1. Extract the gaming driver installation utility from the downloaded `.zip` archive.

   ```
   [ec2-user ~]$ unzip latest-driver-name.zip -d nvidia-drivers
   ```

1. Add permissions to run the driver installation utility using the following command:

   ```
   [ec2-user ~]$ chmod +x nvidia-drivers/NVIDIA-Linux-x86_64*-grid.run
   ```

1. Run the installer using the following command:

   ```
   [ec2-user ~]$ sudo ./nvidia-drivers/NVIDIA-Linux-x86_64*.run
   ```

   If you are using Amazon Linux 2 with kernel version 5.10, use the following command to install the NVIDIA gaming drivers.

   ```
   [ec2-user ~]$ sudo CC=/usr/bin/gcc10-cc ./NVIDIA-Linux-x86_64*.run
   ```

   When prompted, accept the license agreement and specify the installation options as required (you can accept the default options).

1. Use the following command to create the required configuration file.

   ```
   [ec2-user ~]$ cat << EOF | sudo tee -a /etc/nvidia/gridd.conf
   vGamingMarketplace=2
   EOF
   ```

1. Use the following command to download and rename the certification file.
   + For version 590.48 or later:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert_2026_03_02.cert"
     ```
   + For version 460.39 to 580.95:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCertLinux_2024_02_22.cert"
     ```
   + For version 440.68 to 445.48:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert-Linux_2020_04.cert"
     ```
   + For earlier versions:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert-Linux_2019_09.cert"
     ```

1. If you are using NVIDIA driver version 510.x or greater on the G4dn, G5, or G5g instances, disable GSP with the following commands. For more information about why this is required, see the [NVIDIA documentation](https://docs.nvidia.com/vgpu/latest/grid-vgpu-user-guide/index.html#disabling-gsp).

   ```
   [ec2-user ~]$ sudo touch /etc/modprobe.d/nvidia.conf
   ```

   ```
   [ec2-user ~]$ echo "options nvidia NVreg_EnableGpuFirmware=0" | sudo tee --append /etc/modprobe.d/nvidia.conf
   ```

1. Reboot the instance.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. Verify the NVIDIA Gaming license using the following command.

   ```
   [ec2-user ~]$ nvidia-smi.exe -q
   ```

   In the output, search for `vGPU Software Licensed Product`.

1. (Optional) To help take advantage of a single display of up to 4K resolution, set up the high-performance display protocol [Amazon DCV](https://docs.aws.amazon.com/dcv/).

## CentOS 7 and Red Hat Enterprise Linux 7
<a name="nvidia-gaming-centos7-rhel7"></a>

**To install the NVIDIA gaming driver on your instance**

1. Connect to your Linux instance. Install **gcc** and **make**, if they are not already installed.

   ```
   [ec2-user ~]$ sudo yum install -y gcc make
   ```

1. Update your package cache and get the package updates for your instance.

   ```
   [ec2-user ~]$ sudo yum update -y
   ```

1. Reboot your instance to load the latest kernel version.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. Reconnect to your instance after it has rebooted.

1. Install the kernel headers package for the version of the kernel you are currently running.

   ```
   [ec2-user ~]$ sudo yum install -y unzip kernel-devel-$(uname -r)
   ```

1. Disable the `nouveau` open source driver for NVIDIA graphics cards.

   1. Add `nouveau` to the `/etc/modprobe.d/blacklist.conf` blacklist file. Copy the following code block and paste it into a terminal.

      ```
      [ec2-user ~]$ cat << EOF | sudo tee --append /etc/modprobe.d/blacklist.conf
      blacklist vga16fb
      blacklist nouveau
      blacklist rivafb
      blacklist nvidiafb
      blacklist rivatv
      EOF
      ```

   1. Edit the `/etc/default/grub` file and add the following line:

      ```
      GRUB_CMDLINE_LINUX="rdblacklist=nouveau"
      ```

   1. Rebuild the Grub configuration.

      ```
      [ec2-user ~]$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
      ```

1. Download the gaming driver installation utility using the following command:

   ```
   [ec2-user ~]$ aws s3 cp --recursive s3://nvidia-gaming/linux/latest/ .
   ```

   Multiple versions of the gaming driver are stored in this bucket. You can see all of the available versions using the following command:

   ```
   [ec2-user ~]$ aws s3 ls --recursive s3://nvidia-gaming/linux/
   ```

1. Extract the gaming driver installation utility from the downloaded `.zip` archive.

   ```
   [ec2-user ~]$ unzip *Gaming-Linux-Guest-Drivers.zip -d nvidia-drivers
   ```

1. Add permissions to run the driver installation utility using the following command:

   ```
   [ec2-user ~]$ chmod +x nvidia-drivers/NVIDIA-Linux-x86_64*-grid.run
   ```

1. Run the installer using the following command:

   ```
   [ec2-user ~]$ sudo nvidia-drivers/NVIDIA-Linux-x86_64*.run
   ```

   When prompted, accept the license agreement and specify the installation options as required (you can accept the default options).

1. Use the following command to create the required configuration file.

   ```
   [ec2-user ~]$ cat << EOF | sudo tee -a /etc/nvidia/gridd.conf
   vGamingMarketplace=2
   EOF
   ```

1. Use the following command to download and rename the certification file.
   + For version 590.48 or later:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert_2026_03_02.cert"
     ```
   + For version 460.39 to 580.95:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCertLinux_2024_02_22.cert"
     ```
   + For version 440.68 to 445.48:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert-Linux_2020_04.cert"
     ```
   + For earlier versions:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert-Linux_2019_09.cert"
     ```

1. If you are using NVIDIA driver version 510.x or greater on the G4dn, G5, or G5g instances, disable GSP with the following commands. For more information about why this is required, see the [NVIDIA documentation](https://docs.nvidia.com/vgpu/latest/grid-vgpu-user-guide/index.html#disabling-gsp).

   ```
   [ec2-user ~]$ sudo touch /etc/modprobe.d/nvidia.conf
   ```

   ```
   [ec2-user ~]$ echo "options nvidia NVreg_EnableGpuFirmware=0" | sudo tee --append /etc/modprobe.d/nvidia.conf
   ```

1. Reboot the instance.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. (Optional) To help take advantage of a single display of up to 4K resolution, set up the high-performance display protocol [Amazon DCV](https://docs.aws.amazon.com/dcv/). If you do not require this functionality, do not complete this step.

## CentOS Stream 8 and Red Hat Enterprise Linux 8
<a name="nvidia-gaming-centos8-rhel8"></a>

**To install the NVIDIA gaming driver on your instance**

1. Connect to your Linux instance. Install **gcc** and **make**, if they are not already installed.

   ```
   [ec2-user ~]$ sudo yum install -y gcc make
   ```

1. Update your package cache and get the package updates for your instance.

   ```
   [ec2-user ~]$ sudo yum update -y
   ```

1. Reboot your instance to load the latest kernel version.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. Reconnect to your instance after it has rebooted.

1. Install the kernel headers package for the version of the kernel you are currently running.

   ```
   [ec2-user ~]$ sudo yum install -y unzip kernel-devel-$(uname -r)
   ```

1. Download the gaming driver installation utility using the following command:

   ```
   [ec2-user ~]$ aws s3 cp --recursive s3://nvidia-gaming/linux/latest/ .
   ```

   Multiple versions of the gaming driver are stored in this bucket. You can see all of the available versions using the following command:

   ```
   [ec2-user ~]$ aws s3 ls --recursive s3://nvidia-gaming/linux/
   ```

1. Extract the gaming driver installation utility from the downloaded `.zip` archive.

   ```
   [ec2-user ~]$ unzip *Gaming-Linux-Guest-Drivers.zip -d nvidia-drivers
   ```

1. Add permissions to run the driver installation utility using the following command:

   ```
   [ec2-user ~]$ chmod +x nvidia-drivers/NVIDIA-Linux-x86_64*-grid.run
   ```

1. Run the installer using the following command:

   ```
   [ec2-user ~]$ sudo nvidia-drivers/NVIDIA-Linux-x86_64*.run
   ```

   When prompted, accept the license agreement and specify the installation options as required (you can accept the default options).

1. Use the following command to create the required configuration file.

   ```
   [ec2-user ~]$ cat << EOF | sudo tee -a /etc/nvidia/gridd.conf
   vGamingMarketplace=2
   EOF
   ```

1. Use the following command to download and rename the certification file.
   + For version 590.48 or later:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert_2026_03_02.cert"
     ```
   + For version 460.39 to 580.95:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCertLinux_2024_02_22.cert"
     ```
   + For version 440.68 to 445.48:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert-Linux_2020_04.cert"
     ```
   + For earlier versions:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert-Linux_2019_09.cert"
     ```

1. If you are using NVIDIA driver version 510.x or greater on the G4dn, G5, or G5g instances, disable GSP with the following commands. For more information about why this is required, see the [NVIDIA documentation](https://docs.nvidia.com/vgpu/latest/grid-vgpu-user-guide/index.html#disabling-gsp).

   ```
   [ec2-user ~]$ sudo touch /etc/modprobe.d/nvidia.conf
   ```

   ```
   [ec2-user ~]$ echo "options nvidia NVreg_EnableGpuFirmware=0" | sudo tee --append /etc/modprobe.d/nvidia.conf
   ```

1. Reboot the instance.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. (Optional) To help take advantage of a single display of up to 4K resolution, set up the high-performance display protocol [Amazon DCV](https://docs.aws.amazon.com/dcv/).

## Rocky Linux 8
<a name="nvidia-gaming-rocky-linux-8"></a>

**To install the NVIDIA gaming driver on your instance**

1. Connect to your Linux instance. Install **gcc** and **make**, if they are not already installed.

   ```
   [ec2-user ~]$ sudo yum install -y gcc make
   ```

1. Update your package cache and get the package updates for your instance.

   ```
   [ec2-user ~]$ sudo yum update -y
   ```

1. Reboot your instance to load the latest kernel version.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. Reconnect to your instance after it has rebooted.

1. Install the kernel headers package for the version of the kernel you are currently running.

   ```
   [ec2-user ~]$ sudo dnf install -y unzip elfutils-libelf-devel libglvnd-devel kernel-devel-$(uname -r)
   ```

1. Download the gaming driver installation utility using the following command:

   ```
   [ec2-user ~]$ aws s3 cp --recursive s3://nvidia-gaming/linux/latest/ .
   ```

   Multiple versions of the gaming driver are stored in this bucket. You can see all of the available versions using the following command:

   ```
   [ec2-user ~]$ aws s3 ls --recursive s3://nvidia-gaming/linux/
   ```

1. Extract the gaming driver installation utility from the downloaded `.zip` archive.

   ```
   [ec2-user ~]$ unzip *Gaming-Linux-Guest-Drivers.zip -d nvidia-drivers
   ```

1. Add permissions to run the driver installation utility using the following command:

   ```
   [ec2-user ~]$ chmod +x nvidia-drivers/NVIDIA-Linux-x86_64*-grid.run
   ```

1. Run the installer using the following command:

   ```
   [ec2-user ~]$ sudo nvidia-drivers/NVIDIA-Linux-x86_64*.run
   ```

   When prompted, accept the license agreement and specify the installation options as required (you can accept the default options).

1. Use the following command to create the required configuration file.

   ```
   [ec2-user ~]$ cat << EOF | sudo tee -a /etc/nvidia/gridd.conf
   vGamingMarketplace=2
   EOF
   ```

1. Use the following command to download and rename the certification file.
   + For version 590.48 or later:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert_2026_03_02.cert"
     ```
   + For version 460.39 to 580.95:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCertLinux_2024_02_22.cert"
     ```
   + For version 440.68 to 445.48:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert-Linux_2020_04.cert"
     ```
   + For earlier versions:

     ```
     [ec2-user ~]$ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert-Linux_2019_09.cert"
     ```

1. If you are using NVIDIA driver version 510.x or greater on the G4dn, G5, or G5g instances, disable GSP with the following commands. For more information about why this is required, see the [NVIDIA documentation](https://docs.nvidia.com/vgpu/latest/grid-vgpu-user-guide/index.html#disabling-gsp).

   ```
   [ec2-user ~]$ sudo touch /etc/modprobe.d/nvidia.conf
   ```

   ```
   [ec2-user ~]$ echo "options nvidia NVreg_EnableGpuFirmware=0" | sudo tee --append /etc/modprobe.d/nvidia.conf
   ```

1. Reboot the instance.

   ```
   [ec2-user ~]$ sudo reboot
   ```

1. (Optional) To help take advantage of a single display of up to 4K resolution, set up the high-performance display protocol [Amazon DCV](https://docs.aws.amazon.com/dcv/).

## Ubuntu and Debian
<a name="nvidia-gaming-ubuntu-debian"></a>

**To install the NVIDIA gaming driver on your instance**

1. Connect to your Linux instance. Install **gcc** and **make**, if they are not already installed.

   ```
   $ sudo apt-get install -y gcc make build-essential
   ```

1. Update your package cache and get the package updates for your instance.

   ```
   $ sudo apt-get update -y
   ```

1. Upgrade the `linux-aws` package to receive the latest version.

   ```
   $ sudo apt-get upgrade -y linux-aws
   ```

1. Reboot your instance to load the latest kernel version.

   ```
   $ sudo reboot
   ```

1. Reconnect to your instance after it has rebooted.

1. Install the kernel headers package for the version of the kernel you are currently running.

   ```
   $ sudo apt install -y unzip dkms linux-headers-$(uname -r)
   ```

1. Disable the `nouveau` open source driver for NVIDIA graphics cards.

   1. Add `nouveau` to the `/etc/modprobe.d/blacklist.conf` blacklist file. Copy the following code block and paste it into a terminal.

      ```
      $ cat << EOF | sudo tee --append /etc/modprobe.d/blacklist.conf
      blacklist vga16fb
      blacklist nouveau
      blacklist rivafb
      blacklist nvidiafb
      blacklist rivatv
      EOF
      ```

   1. Edit the `/etc/default/grub` file and add the following line:

      ```
      GRUB_CMDLINE_LINUX="rdblacklist=nouveau"
      ```

   1. Rebuild the Grub configuration.

      ```
      $ sudo update-grub
      ```

1. Download the gaming driver installation utility using the following command:

   ```
   $ aws s3 cp --recursive s3://nvidia-gaming/linux/latest/ .
   ```

   Multiple versions of the gaming driver are stored in this bucket. You can see all of the available versions using the following command:

   ```
   $ aws s3 ls --recursive s3://nvidia-gaming/linux/
   ```

1. Extract the gaming driver installation utility from the downloaded `.zip` archive.

   ```
   $ unzip *Gaming-Linux-Guest-Drivers.zip -d nvidia-drivers
   ```

1. Add permissions to run the driver installation utility using the following command:

   ```
   $ chmod +x nvidia-drivers/NVIDIA-Linux-x86_64*-grid.run
   ```

1. Run the installer using the following command:

   ```
   $ sudo nvidia-drivers/NVIDIA-Linux-x86_64*.run
   ```

   When prompted, accept the license agreement and specify the installation options as required (you can accept the default options).

1. Use the following command to create the required configuration file.

   ```
   $ cat << EOF | sudo tee -a /etc/nvidia/gridd.conf
   vGamingMarketplace=2
   EOF
   ```

1. Use the following command to download and rename the certification file.
   + For version 590.48 or later:

     ```
     $ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert_2026_03_02.cert"
     ```
   + For version 460.39 to 580.95:

     ```
     $ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCertLinux_2024_02_22.cert"
     ```
   + For version 440.68 to 445.48:

     ```
     $ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert-Linux_2020_04.cert"
     ```
   + For earlier versions:

     ```
     $ sudo curl -o /etc/nvidia/GridSwCert.txt "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert-Linux_2019_09.cert"
     ```

1. If you are using NVIDIA driver version 510.x or greater on the G4dn, G5, or G5g instances, disable GSP with the following commands. For more information about why this is required, see the [NVIDIA documentation](https://docs.nvidia.com/vgpu/latest/grid-vgpu-user-guide/index.html#disabling-gsp).

   ```
   $ sudo touch /etc/modprobe.d/nvidia.conf
   ```

   ```
   $ echo "options nvidia NVreg_EnableGpuFirmware=0" | sudo tee --append /etc/modprobe.d/nvidia.conf
   ```

1. Reboot the instance.

   ```
   $ sudo reboot
   ```

1. (Optional) To help take advantage of a single display of up to 4K resolution, set up the high-performance display protocol [Amazon DCV](https://docs.aws.amazon.com/dcv/). If you do not require this functionality, do not complete this step.

## Windows operating systems
<a name="nvidia-gaming-windows"></a>

Before you install an NVIDIA gaming driver on your instance, you must ensure that the following prerequisites are met in addition to the considerations mentioned for all gaming drivers.
+ If you launch your Windows instance using a custom Windows AMI, the AMI must be a standardized image created with Windows Sysprep to ensure that the gaming driver works. For more information, see [Create an Amazon EC2 AMI using Windows Sysprep](ami-create-win-sysprep.md).
+ Configure default credentials for the AWS Tools for Windows PowerShell on your Windows instance. For more information, see [Getting Started with the AWS Tools for Windows PowerShell](https://docs.aws.amazon.com/powershell/latest/userguide/pstools-getting-started.html) in the *AWS Tools for PowerShell User Guide*.

**To install the NVIDIA gaming driver on your Windows instance**

1. Connect to your Windows instance and open a PowerShell window.

1. Download and install the gaming driver using the following PowerShell commands.

   ```
   $Bucket = "nvidia-gaming"
   $KeyPrefix = "windows/latest"
   $LocalPath = "$home\Desktop\NVIDIA"
   $Objects = Get-S3Object -BucketName $Bucket -KeyPrefix $KeyPrefix -Region us-east-1
   foreach ($Object in $Objects) {
   $LocalFileName = $Object.Key
   if ($LocalFileName -ne '' -and $Object.Size -ne 0) {
   $LocalFilePath = Join-Path $LocalPath $LocalFileName
   Copy-S3Object -BucketName $Bucket -Key $Object.Key -LocalFile $LocalFilePath -Region us-east-1
   }
   }
   ```

   Multiple versions of the NVIDIA GRID driver are stored in this S3 bucket. You can download all of the available versions in the bucket if you change the value of the `$KeyPrefix` variable from *"windows/latest"* to *"windows"*.

1. Navigate to the desktop and double-click the installation file to launch it (choose the driver version that corresponds to your instance OS version). Follow the instructions to install the driver and reboot your instance as required. To verify that the GPU is working properly, check Device Manager.

1. Use one of the following methods to register the driver.

------
#### [ Version 527.27 or above ]

   Create the following registry key with the 64-bit version of PowerShell, or the Command Prompt window.

   *key*: `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\nvlddmkm\Global`

   *name*: vGamingMarketplace

   *type*: DWord

   *value*: 2

**PowerShell**  
Run the following PowerShell command to create this registry value. The AWS Tools for PowerShell in AWS Windows AMIs defaults to the 32-bit version and this command fails. Instead, use the 64-bit version of PowerShell included with the operating system.

   ```
   New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\nvlddmkm\Global" -Name "vGamingMarketplace" -PropertyType "DWord" -Value "2"
   ```

**Command Prompt**  
Run the following registry command to create this registry value. You can run it using the Command Prompt window or a 64-bit version of PowerShell.

   ```
   reg add "HKLM\SYSTEM\CurrentControlSet\Services\nvlddmkm\Global" /v vGamingMarketplace /t REG_DWORD /d 2
   ```

------
#### [ Earlier versions ]

   Create the following registry key with the 64-bit version of PowerShell, or the Command Prompt window.

   *key*: `HKEY_LOCAL_MACHINE\SOFTWARE\NVIDIA Corporation\Global`

   *name*: vGamingMarketplace

   *type*: DWord

   *value*: 2

**PowerShell**  
Run the following PowerShell command to create this registry value. The AWS Tools for PowerShell in AWS Windows AMIs defaults to the 32-bit version and this command fails. Instead, use the 64-bit version of PowerShell included with the operating system.

   ```
   New-ItemProperty -Path "HKLM:\SOFTWARE\NVIDIA Corporation\Global" -Name "vGamingMarketplace" -PropertyType "DWord" -Value "2"
   ```

**Command Prompt**  
Run the following registry command to create this registry key with the Command Prompt window. You can also use this command in the 64-bit version of PowerShell.

   ```
   reg add "HKLM\SOFTWARE\NVIDIA Corporation\Global" /v vGamingMarketplace /t REG_DWORD /d 2
   ```

------

1. Run the following command in PowerShell. This downloads the certification file, renames the file `GridSwCert.txt`, and moves the file to the Public Documents folder on your system drive. Typically, the folder path is `C:\Users\Public\Documents`.
   + For version 591.59 or later:

     ```
     Invoke-WebRequest -Uri "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert_2026_03_02.cert" -OutFile "$Env:PUBLIC\Documents\GridSwCert.txt"
     ```
   + For version 460.39 to 581.80:

     ```
     Invoke-WebRequest -Uri "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCertWindows_2024_02_22.cert" -OutFile "$Env:PUBLIC\Documents\GridSwCert.txt"
     ```
   + For version 445.87:

     ```
     Invoke-WebRequest -Uri "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert-Windows_2020_04.cert" -OutFile "$Env:PUBLIC\Documents\GridSwCert.txt"
     ```
   + For earlier versions:

     ```
     Invoke-WebRequest -Uri "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCert-Windows_2019_09.cert" -OutFile "$Env:PUBLIC\Documents\GridSwCert.txt"
     ```

   If you receive an error when downloading the file, and you are using Windows Server 2016 or earlier, TLS 1.2 might need to be enabled for your PowerShell terminal. You can enable TLS 1.2 for the current PowerShell session with the following command and then try again:

   ```
   [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
   ```

1. Reboot your instance.

1. Locate the `nvidia-smi.exe` file on the instance.

   ```
   Get-ChildItem -Path C:\ -Recurse -Filter "nvidia-smi.exe"
   ```

   Verify the NVIDIA Gaming license using the following command. Replace *path* with the name of the folder in the output from the previous command.

   ```
   C:\Windows\System32\DriverStore\FileRepository\path\nvidia-smi.exe -q
   ```

   The output should be similar to the following.

   ```
   vGPU Software Licensed Product
   Product Name              : NVIDIA Cloud Gaming
   License Status            : Licensed (Expiry: N/A)
   ```

1. (Optional) To help take advantage of the single display of up to 4K resolution, set up the high-performance display protocol [Amazon DCV](https://docs.aws.amazon.com/dcv/). If you do not require this functionality, do not complete this step.