AWS Marketplace

Going to market with SaaS subscriptions and contracts in AWS Marketplace

By Judah Bernstein, Partner Solutions Architect (SA) at AWS focused on SaaS

Tapo Ghosh, Partner Solutions Architect focused in AWS Marketplace

This post is for independent software vendors (ISVs) offering software as a service (SaaS) solutions. In this blog post, we provide an overview of billing through SaaS contracts in AWS Marketplace. We also give a few simple use cases for SaaS subscriptions and SaaS contracts in AWS Marketplace. Each use case includes design considerations and code examples for integration.

As an ISV building a SaaS solution, you must get to a minimum viable product (MVP) quickly to remain competitive. At the same time, you need to build a strong go-to-market (GTM) strategy that enables you to attract and retain customers at scale. However, it can be challenging for you to remain focused on GTM strategy while development teams are still struggling to meet MVP requirements, such as tenant identity, tenant isolation, provisioning, data partitioning, analytics, monitoring, management, billing, and metering. Many SaaS ISVs have discovered that leveraging AWS Marketplace helps them overcome these challenges, enabling them to accelerate their time to value (TtV) and extend their reach to AWS customers.

In this post, we demonstrate how AWS Marketplace simplifies procurement and provides flexible pricing options for customers. We explain some of the more complex billing mechanisms that you can implement and the corresponding integration code. Finally, we close with next steps that you can take to get started with SaaS subscriptions and SaaS contracts in AWS Marketplace.

SaaS procurement in AWS Marketplace

AWS Marketplace gives you an accelerated GTM strategy by providing you the ability to list your SaaS solutions within a curated software catalog. You can also meter your customer consumption of your SaaS solutions with the AWS Marketplace Metering Service API and extend your reach into new markets and geographies.

SaaS subscriptions and SaaS contracts

AWS Marketplace supports two options for purchasing SaaS and API products. With SaaS subscriptions, your customers pay only for actual use. With SaaS contracts, your customers pay for expected usage with monthly or one-, two-, or three-year terms. These options give your customers access to products that were previously unavailable on an AWS bill, enabling them to compare products and simplify the payment process.

SaaS subscriptions

If you’re interested in selling your solution as a subscription in AWS Marketplace, you must use the AWS Marketplace Metering Service to enable AWS to bill your customers for the SaaS application use. AWS Marketplace Metering Service provides a consumption monetization model where your customers are billed for the number of resources that they use in your application.

With SaaS subscriptions billing, AWS Marketplace passes a billing identifier to you when your customer subscribes to a product. Once a customer subscribes, you are responsible for managing the customer account creation, resource provisioning, and account management. For the purposes of this blog, these items are out of scope since they are programmatic constructs defined by you in your application.

When your application meters usage for your customer, your application is providing AWS with a quantity of usage accrued for a given hour. Your application meters for real units of value, such as gigabytes transferred or hosts scanned in a given hour. AWS uses this information to calculate your customer’s bill based on rates that you provide when you create a SaaS listing. Your transaction proceeds are disbursed to you after they’re collected from your customer.

SaaS contracts

If you want to sell your solution as a contract in AWS Marketplace, use AWS Marketplace Entitlement Service to bill your customers in advance for the use of your software. Also called the AWS Marketplace Contract Service, this service provides an entitlement monetization model where your customers are invoiced in advance for a certain amount of usage of your software.

In the contracts model, AWS invoices your customers upfront for a selected quantity of usage as defined in the contract. From that point forward, your customers are entitled to use those resources in a specified quantity and for a defined period of time. For example, a customer might purchase a quantity of users who can use your application for a one-month time period or for one-year, two-year, or three-year time periods. AWS Marketplace communicates these entitlements to your SaaS application through the AWS Marketplace Entitlement Service. Under the contract model, your application doesn’t send metering records. Instead, it verifies entitlements by calling the AWS Marketplace Entitlement Service.

Defining categories and dimensions

The Listing your SaaS Product Documentation provides general guidance on how you can develop your SaaS pricing model.

Before listing your SaaS product in AWS Marketplace, you have to define how your product should be priced. You can do this during the product submission for listing. You use categories and dimensions to define your pricing model. Think of a category as what you’re charging for. Examples of supported categories include Users, Hosts, Data, Bandwidth, Requests, and Units.

Here are some examples of category mappings:

A)   A SaaS solution that provides users with specific defined functionality, such as a customer relationship management (CRM) system or an accounting information system, might charge per user.

B)   A SaaS solution that analyzes computing hardware for known security vulnerabilities, such as scanning Amazon Elastic Compute Cloud (Amazon EC2) instances, might charge per host.

C)   A SaaS solution that digests data generated by a customer application and reports trends and anomalies, such as log analysis, management might charge per amount of data collected, processed, or indexed.

D)   A SaaS solution that provides EC2 instance and application monitoring for customers applications might charge per host type (such as small, medium, large). It might also charge additionally for the number of application transactions.

Think of a dimension as the amount of a specific type of category. Each dimension type and amount is variable. Ultimately, how you bill your customers for consumption of your SaaS contract or SaaS subscription determines the application. For example, the following table describes the dimensions available for defined categories for a SaaS subscription.

category dimension for saas AWS Marketplace

The AWS Marketplace Metering Service enables you to either specify a single dimension or define up to 24 dimensions, each with a specific price. Examples A and B in the preceding list could use a single dimension, where customers pay a single price regardless of the type of user or host. Example C could use multiple dimensions, thus enabling you to vary customer price by size, capacity, or type. For example D, you might want to charge more to scan a larger EC2 instance than a smaller EC2 instance. You could create dimensions labeled Small, Medium, and Large to classify the EC2 instance type that your customers are scanning so that you can stratify pricing based on work effort.

If you take examples A-D, you could correlate them and their associated categories to specific dimensions as follows:

A)   In example A, the number of user hours (UserHrs) could be the dimension.

This means that if there are 30 users, 30 UserHrs per hour are sent to the AWS Marketplace Metering Service. Alternatively, because metering records are sent every hour, you might be interested in billing for active users (not registered), so you can bill using the UserHrs dimension for true consumption instead.

B)   In example B, host hours (HostHrs) could be the dimension.

This is similar to an AWS customer using On-Demand Pricing for EC2 instances that are billed only for the number of HostHrs. The SaaS application can scan customer EC2 instances and bill for the number of hours that a scan took. Suppose that two instances are running, where one was scanned for 20 hours in a month and another that was scanned 10 hours in a month. With a single dimension, the total number of HostHrs metered for your SaaS application would be 30 hours for that month. The metering records must be sent on an hourly basis, up to one hour after the previous hourly period. Therefore, after each hour that the SaaS application scans an EC2 instance, it needs to send a metering record for one HostHrs.

C)   In example C, you might want to use MB, GB, and TB dimensions.

You might offer a pricing reduction per dimension when your customer’s usage reaches a minimum of 1 TB, thereby offering savings over MB or GB data usage.  This per-dimension reduction model amounts to a volume discount for data processing or storage use cases.

D)   In example D, you might want to configure custom dimensions in the Unit category. (Unit dimensions are ISV-configurable to provide flexibility for custom product listings.)

You might offer a pricing reduction per dimension when your customer’s usage reaches a minimum of 1 TB, thereby offering savings over MB or GB data usage. This per-dimension reduction model amounts to a volume discount for data processing or storage use cases.

In this example, you can configure multiple custom dimensions for host monitoring for each EC2 instance type. You could configure EC2-S (small), EC2-M (medium), EC2-L (large), and other dimensions for the application transactions such as REQ-W (web transactions) and REQ-A (application transactions).

Metering with the AWS Marketplace Metering Service API and AWS SDK

A developer can use the batchMeterUsage API operation to post metering records using a JavaScript Object Notation (JSON) object. Every request to batchMeterUsage is for one product. If you need to meter usage for multiple products, you must make multiple calls to batchMeterUsage.

Before the batchMeterUsage operation is called, a SaaS application calls another API operation, resolveCustomer, during the registration process. When your customer visits your website during the registration process, they submit a registration token through their browser. The registration token is resolved through this operation to obtain a CustomerIdentifier and ProductCode, and you can use that information in the metering request, as shown in the following code.

use customerid and productcode in code

The following code shows how a developer can call the batchMeterUsage operation to post multiple metering records to the AWS Marketplace Metering Service.

post multiple metering records code

Successful delivery of metering records to the AWS Marketplace Metering Service on an hourly basis is your responsibility. If an unsuccessful invoke of the required batchMeterUsage operations takes place, the developer has up to one hour following your customer consumption of a resource to resubmit the required metering record. Because most of these calls are asynchronous in nature, we recommend that your developer integrate error handling and retry functionality into their application. This ensures the successful delivery of these metering records within the accepted time window.

AWS Marketplace aggregates these hourly metering records and adds the corresponding line items for the associated SaaS subscriptions that your customer used on their monthly invoice. Then AWS Marketplace bills the customer accordingly.

Entitlements with the AWS Marketplace Entitlement Service API and AWS SDK

When your customer subscribes or changes a contract for your product listing in AWS Marketplace, AWS is responsible for updating a list of customer entitlements. Your internal development team uses these entitlements to identify the services or features that your customer is permitted to consume. Your internal development team can then verify a customer’s entitlements for their SaaS contract by using the getEntitlements API operation, as shown in the following code.

verify customer entitlements code

As with the SaaS subscriptions example, you need to call resolveCustomer with the registration token to get the ProductCode and CustomerIdentifier before the getEntitlements call.

You can filter getEntitlements results by criteria including the CUSTOMER_IDENTIFIER, which simplifies your ability to orchestrate the required customer allowances to the corresponding SaaS application. These values change over time and whenever your customer changes their contract. As a result, you need to check entitlements on a regular basis. For this reason, we recommend calling getEntitlements multiple times per day.

Examples of use cases for AWS Marketplace SaaS subscriptions

All examples in this section use a fictitious ISV, Example Corp., which has different categories of products. The purpose of this is to illustrate a couple approaches you can take when listing your SaaS subscription in AWS Marketplace.

Example 1: data, network performance platform, single-dimension billing

In this example, Tapo and I show a simple approach to metering consumption of your SaaS subscription using a single category and a single dimension where there is a static price per consumption.

Use case

The data category with a single dimension is best if you bill for known quantities, such as bandwidth/hour, and if your products have a defined price per period, such as GB/hour. As shown in the following image, this subscription in AWS Marketplace charges customers a flat rate per GB of traffic sent out to the internet.

single dimension

The single-dimension billing model is also useful for models with a specific cost for a single measure, such as users, hosts, bandwidth, requests, or units.

Technical implementation

In this use case, you’re responsible for sending a metering record every hour (per customer) for the usage of the corresponding dimension (in this case, GB). Therefore, you need to use the batchmeterUsage operation only hourly for each customer as described, along with the corresponding dimension name and usage quantity. AWS bills each customer at the end of the month for an aggregate of subscription usage based on these hourly metering records. The following code shows how to send an individual metering record to the AWS Marketplace Metering API for this use case.

send invididual metering record code

Example 2: Hosts, security as a service, multiple-dimension billing

In this example, we show a more dynamic pricing option for a single category based on corresponding unit type, where each unit type is a specific dimension and has a specific associated cost.

Use case

The Hosts category with multiple dimensions is best if you offer your subscription at a set price by host type and number of host hours. In this use case, Example Corp. has a specific price per host hour depending on the type of host. As shown in the following image, Example Corp. has defined multiple dimensions for each type of host that their customers can subscribe to.

multiple dimensions use case

Example Corp. is charging a different price per host hour based on the type of unit (or host) that the customer is using. This enables the customer to fit their business requirements to the applicable workload type.

While this use case is specific to Hosts, you can implement a similar pricing strategy with the Users category. By defining multiple dimensions, such as the type of user (e.g., an administrator, power user, or read-only user), you can meter for the number of users in each defined user-type (dimension).

Technical implementation

In this example, you’re responsible for sending metering records for the number of host hours per host type (dimension).

Suppose that Example Corp.’s customer has a variety of EC2 instances, including two m4.xlarge, three c2.xlarge, and three t2.micro instances. For each hour that these instances are running, Example Corp. should send metering records to the AWS Marketplace Metering Service for the Host Scanning solution. The m4.xlarge and c2.xlarge instances are of the same unit type as defined in the preceding image, and the t2.micro instance is of a different unit type. Therefore, Example Corp. needs to send two metering records hourly. One metering record specifies the dimension corresponding to the two x.large instance types with their total quantity of five, along with the ProductCode and CustomerIdentifier. The other metering record specifies the dimension corresponding to the micro instance type with its quantity of three, along with the ProductCode and CustomerIdentifier.

The following code shows how to send metering records simultaneously to the AWS Marketplace Metering Service by calling the batchMeterUsage operation with the params listed. Currently, a maximum of 25 metering records at a time are supported.

send metering records simultaneously code

Examples of use cases with AWS Marketplace SaaS contracts

In the previous section, Tapo and I showed how to define a SaaS subscription product listing in which you meter your customers’ consumption dynamically in real time. In this next section, we will show how to monitor your customers’ entitlements when they procure your product through a SaaS contract.

Example 3 – Data Processing Platform with Specific Usage Period

In this example, we show a standard example you can use to verify the contract entitlements of a tier plan within a specific period.

Use case

The Data category is best if you offer a specific contract duration (one, two, or three years) that gives a daily data allowance. In the following image, a customer has an entitlement of a specific amount of usage per Example Corp.’s defined period, per day, for the duration of the contract.

daily data allowance

Technical implementation

In this use case, it’s your responsibility to meter the corresponding daily index volume for your customers and evaluate if the metered usage is within the expected threshold set by the entitlements that each customer purchased. The following code shows how to call the AWS Marketplace Entitlement Service periodically using the getEntitlements operation.

call entitlement service periodically

The following is the JSON response of the customers’ entitlements.

You only get back only the current entitlement, so if a customer has expired entitlements or cancelled the subscription, those old entitlements aren’t in the getEntitlements response.

Conclusion

In this post, we introduced you to the SaaS billing options for AWS Marketplace. We discussed examples of SaaS subscriptions and SaaS contracts options for sample SaaS solutions offered in AWS Marketplace. We also showed some code examples to help you integrate with the billing APIs and accelerate your GTM strategy.

Although these examples might be useful for a straightforward pricing model, we know that some of you have complex pricing needs. In our next post, we will show how we can support those, including tiered billing. We will also offer some guidance on the next steps that you can take to sell your SaaS solution in AWS Marketplace.

About AWS SaaS Factory

AWS SaaS Factory provides AWS Partner Network (APN) Partners with resources that help accelerate and guide their adoption of a SaaS delivery model. AWS SaaS Factory includes reference architectures for building SaaS solutions on AWS, Quick Starts that automate deployments for key workloads on AWS, and exclusive training opportunities for building a SaaS business on AWS. APN Technology Partners who develop SaaS solutions are encouraged to join the program.

About the authors

Judah Bernstein is a Partner Solutions Architect (SA) at AWS focused on SaaS.

 

 

 

 

tapodipta gosh Tapo Gosh is a Partner Solutions Architect focused on AWS Marketplace.