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
To find a paid AMI using the console
-
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
. -
In the navigation pane, choose AMIs.
-
Choose Public images for the first filter.
-
In the Search bar, choose Owner alias, then =, and then aws-marketplace.
-
If you know the product code, choose Product code, then =, and then enter the product code.
To find a paid AMI using AWS Marketplace
Open AWS Marketplace
. Enter the name of the operating system in the search field, and then choose the search button (magnifying glass).
To scope the results further, use one of the categories or filters.
Each product is labeled with its product type: either
AMI
orSoftware 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