How to create a public offer

To create a new public AMI product listing in the AWS marketplace management portal, use the API calls described below:

Create product ID

awsmp public-offer create

ChangeSet created (ID: gxy13m673kmhr4vdtpu0ltwf)
https://aws.amazon.com/marketplace/management/requests/gxy13m673kmhr4vdtpu0ltwf

This request will generate an offer ID associated with the product ID. An offer ID is required generate pricing template file for updating instance types.

Note

For an existing published listing, an offer ID can also be obtained from the AWS console under AWS Marketplace > Manage subscriptions. Select the required listing and look for the Offer ID under Agreement.

If you are in the draft stage, after running this command go to your generated request and check the Entities section under Change request summary.

Add/Edit product description

Once a product ID is created, you can add/edit the product description. The description fields are shown below or you can also refer to the sample config file (listing_configuration.yaml)

listing_configuration.yaml
 product:
     description:
         product_title: str
         logourl: str
         video_urls: Optional[List[str]], can only have 1 url
         short_description: str
         long_description: str
         highlights: List[str]
         search_keywords: List[str]
         categories: List[str]
         support_description: str # Don't include space character at the beginning/end
         support_resources: str
         additional_resources: Optional[List[Dict[str, str]]]
         sku: Optional[str]

For empty values, use ~ for str type and [] for List type

To add/edit the product description, run:

awsmp public-offer update-description \
   --product-id prod-xwpv7txqxg55e \
   --config listing_configuration.yaml

If a field value does not match the required format, it will show up as an error.

Update instance types and pricing

To update instance types and pricing, you need to add offer field containing offer information of the listing. The sample config is described below.

  1. For hourly pricing AMI Product:

listing_configuration.yaml
 offer:
     instance_types:
         - name: c3.large
           hourly: 0.12
         - name: c4.medium
           hourly: 0.08
  1. For hourly and annual pricing AMI product:

listing_configuration.yaml
 offer:
     instance_types:
         - name: c3.large
           yearly: 123.45
           hourly: 0.12
         - name: c4.medium
           yearly: 45.12
           hourly: 0.08
  1. For hourly and monthly pricing AMI product:

listing_configuration.yaml
 offer:
     instance_types:
         - name: c3.large
           yearly: 123.45
           hourly: 0.12
         - name: c4.medium
           yearly: 45.12
           hourly: 0.08
     monthly_subscription_fee: 50.00

Once offer field is ready, run the command:

awsmp public-offer update-instance-type \
   --product-id prod-xwpv7txqxg55e \
   --config listing_configuration.yaml \
   --allow-price-change

The CLI retrieves the added and removed instance types from the configuration by comparing it with the existing listing, then sends the appropriate add/restrict instance type requests. It also compares the pricing before sending a request to avoid unnecessary price changes (increases or decreases) in the listing. To update the price, pass the –price_change-allowed flag.

Update/Add region

To add or update region information of an AMI product listing, use a configuration file with region details and the update-region option.

example listing_configuration.yaml
...
product:
     region:
         commercial_regions: List[str]
         future_region_support_region: bool
...

Update the region using:

awsmp public-offer update-region \
   --product-id prod-xwpv7txqxg55e \
   --config listing_configuration.yaml

Note

For the commercial_regions field, each region name must be specified explicitly. GovCloud regions can be included in commercial_regions.

Add new version

To add new AMI version to an existing AMI listing, create a version configuration file and use the update-version option. A sample version configuration file (listing_configuration.yaml) looks like:

example listing_configuration.yaml
...
product:
     version:
         version_title: str
         release_notes: str
         ami_id: str # Format should be starting with `ami-`
         access_role_arn: str # Format should be starting with 'arn:aws:iam::'
         os_user_name: str
         os_system_version: str
         os_system_name: str # This will be converted to Uppercase
         scanning_port: int # 1-65535
         usage_instructions: str
         recommended_instance_type: str # Please select among instance types you added in Step 2
         ip_protocol: Literal['tcp', 'udp']
         ip_ranges: List[str] # Upto 5 ranges can be added
         from_port: int # 1-65535
         to_port: int # 1-65535
...

Add the new version using:

awsmp public-offer update-version \
   --product-id prod-xwpv7txqxg55e \
   --config listing_configuration.yaml

Release AMI product listing

To publish drafted AMI listing to Limited state, product ID and public offer ID are required:

awsmp public-offer release \
   --product-id prod-fwu3xsqup23cs

Update AMI product listing details

To update AMI product listing with multiple requests for product details (Description, Region Availability, Instance types and Pricing information), run the command below, passing the product ID and product configuration file:

awsmp public-offer update \
   --product-id prod-fwu3xsqup23cs
   --config listing_configuration.yaml

Download AMI product listing details

To download the AMI product listing information as a YAML file, run the command below, providing the product ID and the output file path where the file will be saved:

awsmp public-offer download \
   --product-id prod-fwu3xsqup23cs
   --config listing.yaml