Finding the ID of a DLAMI - Amazon Deep Learning AMIs
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Finding the ID of a DLAMI

Each DLAMI has a unique identifier (ID). When you launch a DLAMI instance using the Amazon EC2 console, you can optionally use the DLAMI ID to search for the DLAMI that you want to use. When you launch a DLAMI instance using the Amazon Command Line Interface (Amazon CLI), this ID is required.

You can find the ID for the DLAMI of your choice by using an Amazon CLI command for either Amazon EC2 or Parameter Store, a capability of Amazon Systems Manager. For instructions on installing and configuring the Amazon CLI, see Get started with the Amazon CLI in the Amazon Command Line Interface User Guide.

Using Parameter Store
To find a DLAMI ID using ssm get-parameter

In the following ssm get-parameter command, for the --name option, the parameter name format is /aws/service/deeplearning/ami/$architecture/$ami_type/latest/ami-id. In this name format, architecture can be either x86_64 or arm64. Specify the ami_type by taking the DLAMI name and removing the keywords "deep", "learning", and "ami". AMI Name can be found in Release notes for DLAMIs.

Important

To use this command, the Amazon Identity and Access Management (IAM) principal that you use must have the ssm:GetParameter permission. For more information about IAM principals, see the Additional resources section of IAM roles in the IAM User Guide.

  • aws ssm get-parameter --name /aws/service/deeplearning/ami/x86_64/base-oss-nvidia-driver-ubuntu-22.04/latest/ami-id \ --region us-east-1 --query "Parameter.Value" --output text

    The output should look similar to the following:

    ami-09ee1a996ac214ce7
    Tip

    For some currently supported DLAMI frameworks, you can find more specific example ssm get-parameter commands in Release notes for DLAMIs. Choose the link to the release notes of your chosen DLAMI, and then find its ID query in the release notes.

Using Amazon EC2 CLI
To find a DLAMI ID using ec2 describe-images

In the following ec2 describe-images command, for the value of the filter Name=name, enter the DLAMI name. You can specify a release version for a given framework, or you can get the latest release by replacing the version number with a question mark (?).

  • aws ec2 describe-images --region us-east-1 --owners amazon \ --filters 'Name=name,Values=Deep Learning Base OSS Nvidia Driver GPU AMI (Ubuntu 22.04) ????????' 'Name=state,Values=available' \ --query 'reverse(sort_by(Images, &CreationDate))[:1].ImageId' --output text

    The output should look similar to the following:

    ami-09ee1a996ac214ce7
    Tip

    For an example ec2 describe-images command that's specific to the DLAMI of your choice, see Release notes for DLAMIs. Choose the link to the release notes of your chosen DLAMI, and then find its ID query in the release notes.

Next step

Launching a DLAMI instance