Find a paid AMI - Amazon Elastic Compute Cloud

Find a paid AMI

There are several ways that you can find AMIs that are available for you to purchase. For example, you can use AWS Marketplace, the Amazon EC2 console, or the command line. Alternatively, a developer might let you know about a paid AMI themselves.

To find a paid AMI using AWS Marketplace
  1. Open AWS Marketplace.

  2. Enter the name of the operating system in the search field, and then choose the search button (magnifying glass).

  3. To scope the results further, use one of the categories or filters.

  4. Each product is labeled with its product type: either AMI or Software as a Service.

You can find a paid AMI using the following describe-images command (AWS CLI).

aws ec2 describe-images --owners aws-marketplace

This command returns numerous details that describe each AMI, including the product code for a paid AMI. The output from describe-images includes an entry for the product code like the following:

"ProductCodes": [ { "ProductCodeId": "product_code", "ProductCodeType": "marketplace" } ],

If you know the product code, you can filter the results by product code. This example returns the most recent AMI with the specified product code.

aws ec2 describe-images --owners aws-marketplace \ --filters "Name=product-code,Values=product_code" \ --query "sort_by(Images, &CreationDate)[-1].[ImageId]"

You can find a paid AMI using the following Get-EC2Image command.

PS C:\> Get-EC2Image -Owner aws-marketplace

The output for a paid AMI includes the product code.

ProductCodeId ProductCodeType ------------- --------------- product_code marketplace

If you know the product code, you can filter the results by product code. This example returns the most recent AMI with the specified product code.

PS C:\> (Get-EC2Image -Owner aws-marketplace -Filter @{"Name"="product-code";"Value"="product_code"} | sort CreationDate -Descending | Select-Object -First 1).ImageId