Amazon EC2 integrates with Amazon DevPay, allowing developers to charge users for the use of their AMIs or to provide support for instances. To learn more about Amazon DevPay refer to the Amazon DevPay Developer Guide. For more information about charging for your use of your AMIs, or providing support, see Creating Paid AMIs
This section describes how to discover paid AMIs, launch paid AMIs, and launch instances with a support product code. Paid AMIs are AMIs you can purchase from other developers.
There are several ways you can determine what paid AMIs are available for you to purchase. You can look for information about them on the Amazon EC2 resource center and forums. Alternatively, a developer might give you information about a paid AMI directly.
You can also tell if an AMI is a paid AMI by describing the image with the ec2-describe-images command. This command lists the product code associated with an AMI (see the following example). If the AMI is a paid AMI, it has a product code. Otherwise, it does not. You can then go to the Amazon EC2 resource center and forums, which might have more information about the paid Amazon EC2 and where you can sign up to use it.
Note | |
---|---|
You must sign up for a paid AMI before you can launch it. |
To check if an AMI is paid
-
Enter the following command:
$
<ami_id>
The
<ami_id>
is the AMI ID.The command returns the following:
IMAGE <ami_id> <manifest> <user_id>, <status> {private | public} <product_code>
The
<ami_id>
is the AMI ID,<manifest>
is the manifest location,<user_id>
is the ID of the user that owns the AMI,<status>
indicates whether the AMI is available, and<product_code>
is the product code associated with the AMI. If a product code is present, the AMI is a paid AMI.
You must sign up for (purchase) the paid AMI before you can launch it.
Typically a seller of a paid AMI presents you with information about the AMI, its price, and a link where you can buy it. When you click the link, you're first asked to log in with an Amazon.com login, and then you are taken to a page where you see the paid AMI's price and you confirm you want to purchase the AMI.
This section describes how to launch paid AMIs and launch instances with a support product code.
After you purchase a paid AMI, you can launch instances of it. Launching a paid AMI is the same as launching any other AMI. No additional parameters are required. The instance will be charged according to the rates set by the owner of the AMI (which will be more than the base Amazon EC2 rate).
To launch a paid AMI
-
Enter the following command:
$
ec2-run-instances
<ami_id>
The
<ami_id>
is the AMI ID.
Note | |
---|---|
The owner of a paid AMI will be able to confirm if a particular instance was launched using their paid AMI. |
Example
This example shows the command used to launch the ami-2bb65342 AMI.
$
ec2-run-instances ami-2bb65342
RESERVATION r-a034c7c9 924417782495 default INSTANCE i-400df629 ami-2bb65342 pending 0 m1.small 2008-03-21T18:49:33+0000 us-east-1c
The paid AMI feature also allows developers to offer support for software (or derived AMIs). Developers can create support products that you can sign up to use. With this model, the developer provides you with a product. During sign-up for the product, the developer gives you a product code for that product, which you must then associate with your own AMI. This allows the developer to confirm that your instance is eligible for support. It also ensures that when you run instances of the product, you are charged according to the developer's terms for the product.
To associate the product code with your AMI
-
Enter the ec2-modify-image-attribute command:
PROMPT>
<ami_id>
--product-code<product_code>
The
<ami_id>
is the AMI ID and<product_code>
is the product code.
Important | |
---|---|
Once set, the product code attribute cannot be changed or removed. |
To launch a paid AMI, no additional parameters are required for the
run-instances
. The instance is charged according
to the rates set by the AMI owner.
Example
The following command associates the ami-2bb65342 AMI with the 774F4FF8 product code.
PROMPT>
ec2-modify-image-attribute ami-2bb65342 --product-code 774F4FF8
productCodes ami-2bb65342 productCode 774F4FF8
The following command launches the ami-2bb65342 paid AMI.
$
ec2-run-instances ami-2bb65342
RESERVATION r-a034c7c9 924417782495 default INSTANCE i-400df629 ami-2bb65342 pending 0 m1.small 2008-03-21T18:49:33+0000 us-east-1c
At the end of each month, you receive an e-mail with the amount your credit card has been charged for using the paid or supported AMIs during the month. This bill is separate from your regular Amazon EC2 bill.
At any time, you can view the usage information for your paid and supported AMIs (go to http://www.amazon.com/dp-applications).