Amazon Elastic Compute Cloud
User Guide (API Version 2012-04-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Creating Paid AMIs

A paid AMI is an AMI that you sell to other Amazon EC2 users. These users pay you according to the price you set. AWS Marketplace and Amazon DevPay provide capabilities to create and distribute paid AMIs. This section gives an introduction to the AWS Marketplace and Amazon Devpay.

The AWS Marketplace is an online store that helps customers find, compare, and immediately start using the software they need to build products and run their businesses. For an overview of the AWS Marketplace, go to https://aws.amazon.com/marketplace/help. You can also visit the AWS Marketplace.

Sellers interested in submitting AMIs to AWS Marketplace should consult the AWS Marketplace Seller's Guide.

AWS Marketplace uses the same approach to validate product codes, see Confirming an Instance Is Running with a Product Code and Getting the Product Code from Within an Instance . However, other details of creating, submitting AMIs to the AWS Marketplace are different, and are discussed in more detail in the AWS Marketplace Seller's Guide.

[Important]Important

Amazon DevPay does not support Amazon EBS-backed AMIs. All paid AMIs must be backed by Amazon instance store.

How Is AWS Marketplace different than DevPay?

There are substantial differences between AWS Marketplace and Amazon DevPay. Both help customers buy software that runs on AWS, but AWS Marketplace offers a more comprehensive experience. For software buyers the key differences are:

  • AWS Marketplace offers a more Amazon.com-like shopping experience, simplifying discovery of available software.

  • AWS Marketplace products work with other AWS features such as VPC and can be run on Reserved and Spot instances, in addition to normal On Demand Instances.

  • AWS Marketplace supports EBS-backed software, where DevPay does not.

Amazon DevPay

A paid AMI is an AMI that you sell to other Amazon EC2 users. They pay you according to the price you set. To be able to create a paid AMI, you use Amazon DevPay.

[Important]Important

Amazon DevPay does not support Amazon EBS-backed AMIs. All paid AMIs must be backed by Amazon instance store.

What is Amazon DevPay? Amazon DevPay is a billing and account management service that enables you to get paid for an AMI you create and that other Amazon EC2 users use. Amazon DevPay creates and manages the order pipeline and billing system for you. Your customers sign up for your AMI, and Amazon DevPay automatically meters their usage of Amazon EC2, bills them based on the pricing you set, and collects their payments. DevPay offers the following:

  • You can charge customers for your Amazon EC2 instance store-backed AMI; the charges can include recurring charges based on the customer's usage Amazon EC2, a fixed one-time charge, and a recurring monthly charge.

  • Your customers can easily sign up and pay for your Amazon EC2 instance store-backed AMI with their trusted Amazon.com accounts.

  • Your customers are authenticated, thus ensuring they have access only to what they should.

  • If your customers don't pay their bills, DevPay turns off their access to your AMI for you.

  • Amazon Payments handles payment processing.

Basic DevPay Flow

1

Your customer uses an Amazon.com account to sign up and pay for your Amazon EC2 instance store-backed AMI. The sign-up page indicates that you have teamed up with Amazon Payments to make billing easy and secure.

2

Your customer pays the price you've defined to use your product.

3

DevPay subtracts a fixed transaction fee and pays you the difference.

4

You pay the costs of Amazon EC2 that your Amazon EC2 instance store-backed AMI used, and a percentage-based DevPay fee.


For more information about Amazon DevPay, refer to the Amazon DevPay Developer Guide.

Summary of How Paid AMIs Work with Amazon DevPay

With a paid AMI using Amazon DevPay, your customers:

  • Must be signed up to use Amazon EC2 themselves

  • Buy your paid Amazon EC2 instance store-backed AMI and then launch instances of it

  • Always use their own AWS credentials when launching instances; you don't launch instances of your paid AMI for them with your credentials

  • Pay the price you set for the paid AMI, and not the normal Amazon EC2 rates

[Important]Important

The discounts you get with Amazon EC2 Reserved Instances don't apply to Amazon DevPay products. That is, if you purchase Reserved Instances, you don't get the lower price associated with them when your customers launch your paid or supported AMIs. Also, if your customers purchase Reserved Instances, when they use your paid or supported AMIs, they continue to pay the price you specified for the use of your paid or supported AMIs. For more information about Reserved Instances, see Reserved Instances.

You can also use Amazon EC2 and Amazon DevPay together with a supported AMI. For more information about supported AMIs, see Supported AMIs.

The following figure and table summarize the basic flow for creating and using paid AMIs.

[Note]Note

Detailed information about most of the following steps is provided in the Amazon DevPay Developer Guide.

Process for Paid AMIs

Paid AMI Process

1

You create an Amazon EC2 instance store-backed AMI as described elsewhere in this guide.

2

You register a product with Amazon DevPay.

For more information, see Product Registration. As part of this process, you provide a product description, product pricing, etc. This registration process creates a product code for the product and a URL where customers can sign up to use the product (called the purchase URL).

[Note]Note

You cannot register an AMI that already has an AWS Marketplace code associated with it.

3

You use an Amazon EC2 command or API call to associate the product code with your Amazon EC2 instance store-backed AMI.

For more information, see Associating a Product Code with an AMI. This makes the AMI a paid AMI.

4

You use an Amazon EC2 command or API call to share the Amazon EC2 instance store-backed AMI with select customers or the public.

For more information, see Sharing Your Paid AMI.

[Note]Note

Even if you share a paid AMI and it has a product code, no one can use the AMI until they sign up for it (see the following steps).

5

You make your paid AMI available for sale.

To do this, you make the aforementioned purchase URL available. You can advertise your paid AMI in the Solutions Catalog on the AWS Developer Connection site and on the Amazon Machine Images (AMIs) page on the AWS Resource Center.

6

Customers use the purchase URL you provide to sign up for and purchase your product.

If they're not already signed up for Amazon EC2, they'll be prompted to sign up. They purchase your product with their Amazon.com accounts. They must have the credentials needed to launch Amazon EC2 instances. At this point, they have the AMI ID (from step 5).

7

Customers then launch an Amazon EC2 instance specifying the AMI ID.

Because you associated the shared AMI with the product code, the customers are charged at the rate you set. For more information, see Paying for AMIs.


[Note]Note

You can associate your DevPay product code with more than one Amazon EC2 instance store-backed AMI. However, a single AMI can be associated with only one product code. If you plan to sell multiple AMIs, you could sell them all under a single product code, or different product codes (by registering multiple DevPay products). For information about why you might choose a single product code or multiple product codes, go to If You Have Multiple AMIs to Sell in the Amazon DevPay Developer Guide.

Each customer's bill for the AMI is displayed on their Application Billing page, which shows the activity for DevPay products. Also, at any time, you can confirm the customer is still currently subscribed to your product. For more information, refer to the Amazon DevPay Developer Guide.

[Note]Note

In the preceding process, you associate your product code with your own Amazon EC2 instance store-backed AMI and sell the AMI as a DevPay product. There's another scenario for using DevPay with Amazon EC2 in which you sell software or a service to EC2 users and let them associate your product code with their own Amazon EC2 instance store-backed AMIs. For more information, see Supported AMIs.

The Product Code and AMI Rebundling

Associating a product code with an AMI turns it into a paid AMI that EC2 users must sign up for to use. Can you ensure that the product code stays with the AMI if someone rebundles the AMI? The answer varies for Linux/UNIX AMIs and Windows AMIs. These are described in the following sections.

Linux/UNIX AMIs

If you give the customer root access to your paid Linux/UNIX AMI, the customer can rebundle it (for more information, see Creating Your Own AMIs). If your customer uses AWS tools to rebundle the AMI, the rebundled AMI inherits the product code. When launching instances of the rebundled AMI, the customer is still billed for usage based on your price. However, if the customer doesn't use the AWS tools when rebundling, the rebundled AMI won't inherit the product code, and the customer will pay normal Amazon EC2 rates and not your price. Also, a customer with root access could find some other way to remove the product code from the AMI.

When a customer contacts you for support for a paid AMI, you can confirm your product code is associated with the AMI and the customer's instance is currently running the AMI. For more information, go to Confirming an Instance Is Running with a Product Code.

If you have software installed on the AMI, the software can retrieve the instance metadata to determine if the product code is associated with the instance. For more information, see Getting the Product Code from Within an Instance.

Keep in mind that the preceding methods for confirming the association of the product code with the instance are not foolproof because a customer with root access to the instance could return false information indicating the product code is associated with the instance.

Windows AMIs

When you associate a product code with a Windows AMI, the association is permanent. Therefore, we recommend you keep a separate, base copy of the AMI that has no product code associated with it.

Anyone who purchases a Windows AMI can rebundle it (for more information, see Creating Your Own AMIs). The product code is automatically transferred to the rebundled AMI. When EC2 users launch instances of the rebundled AMI, they pay the rates you set when you registered your DevPay product. In turn, you're charged for the EC2 costs they incur.

Product Registration

You must register a product with Amazon DevPay. The product can cover a single Amazon EC2 instance store-backed AMI that you want to sell or multiple Amazon EC2 instance store-backed AMIs. During registration, you provide product information such as pricing, and you receive information you need to sell your product.

[Important]Important

The Amazon DevPay Developer Guide covers the procedure for registering your product with Amazon DevPay. Before you register your product, we recommend you read the information in that guide about how to set your AMI's price and how billing for Amazon DevPay products works.

You provide the following information during registration:

  • Company name

  • Product name

  • Product description (as you want your customers to see it)

  • Redirect URL (the page you want customers to see after they have purchased the product)

  • Any terms and conditions you want displayed (optional)

  • Contact e-mail address and telephone number (to be used by AWS and not displayed to customers)

  • Contact e-mail or URL (to be displayed to customers)

  • The specific Regions, environments, and instance types the product covers

  • Pricing for use of the product (you can set different prices based on Region, environment, and instance type)

The information you display at the redirect URL should give information about the AMI.

Registration provides you with the following information:

  • Product code, which contains a product code and type

  • Product token

  • Purchase URL

You need the product code and purchase URL to integrate your product with DevPay as described in Summary of How Paid AMIs Work with Amazon DevPay and Supported AMIs. You need the product token if you're going to set up your system to later verify whether a customer is still subscribed to your product. For more information, refer to the Amazon DevPay Developer Guide.

[Note]Note

AWS must approve your product after you register it. The approval process typically takes one business day.

Associating a Product Code with an AMI

You must be the owner of an Amazon EC2 instance store-backed AMI to associate a product code with it. Each AMI can have only a single product code associated with it, but you can associate a single product code with more than one AMI. You might do this if you have similar versions of an AMI (for example, a 32-bit version and a 64-bit version), you've assigned them all the same price, and you'd like to minimize the number of Amazon DevPay product codes you have (to make your bookkeeping easier).

To associate a product code with an AMI

  • Enter the following command:

    PROMPT>   ec2-modify-image-attribute <ami_id> --product-code <product_code>

    The <ami_id> is the AMI ID and <product_code> is the product code.

To verify the product code is associated with the AMI

  • Enter the following command:

    PROMPT>  ec2-describe-image-attribute  <ami_id> --product-code

You can't change or remove the productCodes attribute after you've set it. If you want to use the same image without the product code or associate a different product code with the image, you must reregister the image to obtain a new AMI ID. You can then use that AMI without a product code or associate the new product code with the AMI ID.

Example

The following example associates the ami-2bb65342 AMI with the 774F4FF8 product code.

PROMPT>   ec2-modify-image-attribute ami-2bb65342 --product-code 774F4FF8

productCodes        ami-2bb65342            productCode   [devpay: 774F4FF8]

This example verifies that the product code is associated with the AMI.

PROMPT>  ec2-describe-image-attribute ami-2bb65342 --product-code

productCodes        ami-2bb65342            productCode   [devpay: 774F4FF8]

Sharing Your Paid AMI

After you associate the product code with the Amazon EC2 instance store-backed AMI, you need to share the AMI with select customers or the public by using the ec2-modify-image-attribute command.

To share the AMI

  • Enter the following command:

    PROMPT>   ec2-modify-image-attribute <ami_id> --launch-permission -a all

    The <ami_id> is the AMI ID.

Even though you've shared the AMI, no one can use it until they sign up for your product by going to the purchase URL. Once customers sign up, any instances of the paid AMI they launch will be billed at the rate you specified during product registration.

Example

The following example shares the ami-2bb65342 AMI with the public.

PROMPT>   ec2-modify-image-attribute ami-2bb65342 --launch-permission -a all

launchPermission        ami-2bb65342    ADD     group   all

Confirming an Instance Is Running with a Product Code

If you have created a product for others to use with their AMIs (the supported AMI scenario), you might want to confirm that a particular AMI is associated with your product code and a particular instance is currently running that AMI. This applies to both DevPay AMIs and AWS Marektlace AMIs.

[Note]Note

You must be the owner of the product code to successfully call ec2-confirm-product-instance with that product code.

Because your customers don't own the product code, they should describe their instances to confirm their instances are running with your product code.

To confirm an instance is running an AMI associated with your product code (DevPay or AWS Marketplace)

  • Enter the following command:

    PROMPT>   ec2-confirm-product-instance <product_code> -i <instance>

    The <product_code> is the product code and <instance> is the instance.

If the AMI is associated with the product code, true is returned with the AMI owner's account ID. Otherwise, false is returned.

Example

The following example confirms whether the i-10a64379 instance is running the 6883959E product code.

PROMPT>   ec2-confirm-product-instance 6883959E -i i-10a64379

6883959E i-10a64379 true 495219933132

Getting the Product Code from Within an Instance

A running Amazon EC2 instance can determine if it has an Amazon DevPay or AWS Marketplace product code. The instance retrieves the product code similarly to how retrieves other metadata. For more information about retrieving metadata, see Using Instance Metadata.

To retrieve a product code, query a web server with this REST-like API call:

GET http://169.254.169.254/2007-03-01/meta-data/product-codes

Amazon EC2 returns a response similar to the following:

774F4FF8

Supported AMIs

Supported AMIs are different from paid AMIs. With a supported AMI, you charge for software or a service you provide that customers use with their own AMIs.

The main difference between a paid AMI and a supported AMI is how the AMI is associated with a product code:

  • Paid AMI—You associate your own product code with your own AMI

  • Supported AMI—Other EC2 users associate your product code with their own AMIs

[Important]Important

If your customers purchase Reserved Instances, they don't get the Reserved Instance price discount with supported AMIs. That is, if they associate your product code with their AMIs, they don't get the lower price associated with their Reserved Instances when they launch those AMIs. They always pay the price that you specified for your DevPay product. For more information, see Reserved Instances.

The following figure and table summarizes the flow for creating and using supported AMIs.

Process for Supported AMIs

Supported AMI Process

1

You register a product with Amazon DevPay.

For more information, see Product Registration. As part of this process, you provide a product description, product pricing, etc. This registration process creates a product code for the product and a URL where customers can sign up to use the product (called the purchase URL).

2

You make your product available for sale.

3

Customers use the purchase URL to sign up for and purchase your product.

If they're not already signed up for Amazon EC2, they'll be prompted to sign up. They purchase your product with their Amazon.com accounts. They must have the credentials needed to launch Amazon EC2 instances. At this point, they have the product code (from step 2).

4

Customers then use an Amazon EC2 command or API call to associate the product code with their Amazon EC2 instance store-backed AMIs.

For more information, see Associating a Product Code with an AMI.

5

Customers then launch one or more instances of the AMIs.

Because the customers associated their AMIs with the product code, they are charged at the rate you set.


[Note]Note

Amazon EC2 prevents your customers (but not you as the product code owner) from associating your product code with AMI types the product isn't configured for. For example, if the product is configured only for Linux/UNIX AMIs, your customers can't associate the product code with Windows AMIs. Also, Amazon EC2 prevents your customers from launching specific instance types your product isn't configured for. For more information about product configuration, go to Your Product's Configuration and Price in the Amazon DevPay Developer Guide.

Each customer's bill for the AMI is displayed on their Application Billing page, which shows the activity for DevPay products. For more information, refer to the Amazon DevPay Developer Guide.

When a customer contacts you for support for an AMI, you can confirm your product code is associated with the AMI and the customer's instance is currently running the AMI. For more information, see Confirming an Instance Is Running with a Product Code.