You can also listen to this topic in our podcast!

AWS Marketplace allows you to sell software to AWS customers. The customer can either run the software on its own (using AMIs and optional CloudFormation), or you can offer the software as a service (SaaS). You can also offer containers and machine learning algorithms in the AWS Marketplace.

The following table summaries your options to sell software in the AWS Marketplace.

Software delivery Pricing AMI free

BYOL

hourly

monthly

annual

pay per use AMI + CloudFormation free

BYOL

hourly

monthly

annual

pay per use AMIs + CloudFormation same as above for first AMI only SaaS pay per use

contract

We started selling our Slack based Incident Management for AWS in the AWS Marketplace in June 2019. So far, we are thrilled with the results. We simplified purchasing marbot, which increased the number of customers. Now, marbot appears on the AWS bill of our customers. If you plan to start a side business in the AWS tooling space, we highly recommend to check out AWS Marketplace!

In this post, you will learn how to sell pay per use SaaS in the AWS Marketplace. I will show you the overall process and finish with code snippets to implement the process.

Requirements

I suggest you create a new AWS account (aka Marketplace Account) to interact with the AWS Marketplace Management Portal Register as an AWS Marketplace seller Create your SaaS product in the AWS Marketplace Management Portal. Creating a product is a chicken and egg problem. You need some information from AWS (like a ProductCode and an SNS topic), and AWS needs information from you. The process has several steps and comes with a testing stage. Create a new AWS account (aka SaaS Account) where you run your software.

Flows

Once you have created your product, you have to implement three different flows:

Deal with subscribes: validate the token you receive from AWS Marketplace via an HTTP POST request Send metering data to AWS Marketplace Deal with unsubscribes: received via an SNS topic

The tricky part is to understand how various parties interact with each other.

Customer AWS Your Marketplace Account Your SaaS Account

Let’s go through the flows in detail.

The following figure demonstrates the interaction.

An AWS customer clicks on the subscribe button in the AWS Marketplace AWS Marketplace forwards the new customer to your website (using an HTTP POST request) with a token Your app assumes an IAM role in the Marketplace Account and calls the ResolveCustomer API to validate the token. AWS Marketplace publishes a subscribe-success message to the SNS topic

Once you received the subscribe-success message, you can report usage for the customer.

Report Usage flow

Every hour, you have to report the usage for every customer. For example, marbot is billed per active user. So we are sending the number of active users for every customer every hour.

To do so, your app assumes an IAM role in the Marketplace Account and calls the BatchMeterUsage API to report usage.

At any time, a customer can cancel the subscription.