Testing design
AWS Marketplace Testing: Live Tests, Mocks, and Emulators
Published: Updated:
Key takeaways
Compare what the application alone, an SDK mock, a local reproduction environment, and live AWS can each establish and what remains to be confirmed, and choose a test venue from the failure you need to investigate.
Editorial information. This article was translated into English by AI from Deshima’s Japanese article; it has not been reviewed or certified by AWS. The linked AWS documentation is current as of November 15, 2026.
Scope: Teams implementing and maintaining AWS Marketplace SaaS integrations. The article distinguishes SaaS Contract, SaaS Subscription, and SaaS Contract with Consumption where applicable. This article is published by Anti-Pattern Inc., the provider of Deshima; the design examples, the test-placement table, and proposed tests are our own recommendations, not AWS guidance. Confirm behavior on AWS with a test purchase of your own product in Limited visibility, a setting in which the AWS accounts that you put on the allowlist can view the product in a limited state (AWS’s SaaS product settings page).
AWS’s page on creating and testing a SaaS product has sellers test with a product in Limited visibility and test purchases from their own account in the real environment. From that page, you cannot determine whether a dedicated sandbox exists that tests the complete Marketplace SaaS integration independently of real purchases and billing. If you want to know whether any test environment other than Limited visibility exists, ask AWS Marketplace Seller Operations, AWS’s support team for sellers.
Because you cannot assume a dedicated sandbox, a development team can plan its tests by combining live AWS checks that use a product in Limited visibility with local checks whose inputs the application side prepares. Keep the steps that require real purchases on AWS, while making cases such as duplicate processing and time boundaries repeatable locally.
AWS testing procedures currently available
Limited is a setting that restricts a product's visibility; you specify the AWS accounts that can view the product by adding them to the allowlist (AWS’s SaaS product settings page). Test purchases are also charged, so AWS says you can temporarily lower the price to keep costs down, and advises replacing the test pricing in your Public Offer with the price buyers will pay before you publish (AWS’s SaaS Subscription integration page, page on creating and testing a SaaS product). Do not treat Limited visibility as a way to switch to a no-charge environment.
Prepare live AWS testing as follows:
- Create the SaaS product and make it available with Limited visibility.
- Confirm the test price and subscribing AWS accounts, and add the necessary accounts to the allowlist.
- Subscribe, test the transition to registration, and obtain buyer and license identifiers with
ResolveCustomer. - Test entitlement retrieval, start/change/end notifications, and usage reporting as applicable to the pricing model.
- Complete the cleanup of test subscriptions, replace the test pricing in your Public Offer with the actual selling price, and then request Public visibility.
The Testing and integrations step in AWS Partner Central also includes a task to subscribe to a paid product without charges through a $0 Private Offer to your own account. For how to use it, see our article What Does “Testing and integrations” in AWS Partner Central Verify?.
Canceling a SaaS Subscription and ending a SaaS Contract follow different procedures, so use the relevant cleanup instructions on AWS’s page on creating and testing a SaaS product. AWS’s SaaS Contract and SaaS Subscription integration guides describe the model-specific steps.
The AWS Partner Central Selling API sandbox tests APIs for opportunities and related sales operations. Do not confuse it with a sandbox covering SaaS purchases, entitlements, and metering together.
The AWS Marketplace blog post of October 13, 2026 on the metering agent skill describes a dry-run mode that validates the generated flow without calling BatchMeterUsage. Its scope differs from an independent sandbox covering purchases, entitlements, and billing acceptance, so even after you check the flow with dry-run, verify AWS’s acceptance in a product with Limited visibility.
Two departments purchasing through the same AWS account
Consider an analytics SaaS that an enterprise procures through AWS Marketplace. Sales planning and research and development each have purchasing authority and buy separate agreements through a shared procurement AWS account. Within the SaaS, sales planning uses tenant Alpha and R&D uses tenant Beta to keep users and data separate.
Here, “the same buyer” means the same buyer AWS account ID. Two accounts belonging to the same legal entity or sharing an AWS Organizations payer are not the same-account case if they subscribe through different member accounts.
For a product supporting Concurrent Agreements, suppose registration returns license A for one purchase and license B for the other. Store these mappings in the SaaS. See the AWS API reference for ResolveCustomer.
| SaaS organization | SaaS tenant ID | CustomerAWSAccountId | LicenseArn |
|---|---|---|---|
| Sales planning | Alpha | 111122223333 | ARN for license A |
| Research and development | Beta | 111122223333 | ARN for license B |
What the AWS Marketplace metering API accepts as the destination for usage is CustomerAWSAccountId and LicenseArn; your SaaS tenant ID is not a billing identifier (BatchMeterUsage request specification). Your SaaS implements the post-purchase process that authenticates the user, checks assignment authority, and associates the returned license with the selected tenant. We recommend not deciding that assignment from an email domain or a buyer-entered AWS account ID alone.
A test that ends only sales planning's agreement passes when Alpha's access under A changes while Beta's access under B continues. Using two licenses detects an implementation that incorrectly suspends everything at buyer-account scope.
AWS’s onboarding page (Registering buyers to your SaaS product) asks you to confirm that no other account in your system shares the same AWS account ID. The same page also explains that LicenseArn distinguishes the separate entitlements that arise from several offers for the same product. These two explanations do not let you determine whether a design that places tenants sharing an AWS account ID, such as Alpha and Beta, contradicts the former procedure. Before you adopt a design that separates tenants, ask AWS Marketplace Seller Operations (contact them through the support page in AWS Partner Central). For mapping agreements to tenants, see Deshima’s article “How to map AWS Marketplace agreements to SaaS tenants.”
Assigning departmental usage to licenses
The following implementation example applies to SaaS Subscription products or the metered component of SaaS Contract with Consumption. A SaaS Contract without consumption does not send usage to BatchMeterUsage. For SaaS Contract with Consumption, developers must also define how included and billable usage are handled under their pricing design.
Concurrent Agreements reports usage per license. Use the LicenseArn obtained at registration, not the commercial AgreementId itself, and include CustomerAWSAccountId in each record. See AWS’s metering guide.
In this example, the SaaS attributes usage to a license in this order:
- Identify the tenant that performed the request or job from the authenticated execution context.
- Resolve the tenant-to-license mapping applicable when usage occurred and record it in the usage ledger.
- Aggregate usage for the same license, buyer account, dimension, and UTC hour, then finalize the quantity.
- Submit the finalized records and retain results and retry candidates in the ledger.
The numeric example uses SaaS Subscription pricing. If sales planning makes 1,000 requests and R&D makes 3,000 in the same UTC hour, create two records with the same account ID and different LicenseArn values. This JSON illustrates the request shape. The ARN strings are placeholders, not runnable data. Timestamp is a Unix timestamp in seconds within the same UTC hour.
{
"UsageRecords": [
{
"CustomerAWSAccountId": "111122223333",
"LicenseArn": "<LicenseArn-A>",
"Dimension": "requests",
"Timestamp": 1794268800,
"Quantity": 1000
},
{
"CustomerAWSAccountId": "111122223333",
"LicenseArn": "<LicenseArn-B>",
"Dimension": "requests",
"Timestamp": 1794268800,
"Quantity": 3000
}
]
}
Use your product's defined billing dimension in place of requests. The new license-based request does not include top-level ProductCode. When migrating from the legacy path, check that the same usage is not reported through both paths. See the AWS API reference for BatchMeterUsage.
The assertion is that A receives 1,000 and B receives 3,000, rather than aggregating both into 4,000 at account scope. AWS’s API reference describes DuplicateRecord as a record with the same customer, dimension, and time but a different quantity (UsageRecordResult API reference), and AWS’s seller guide says that, for products that support Concurrent Agreements, deduplication uses the combination of license, customer, hour, and dimension (AWS’s SaaS usage metering guide). These two pages do not determine whether two records that differ only in license, as in this example, become a DuplicateRecord. Before you implement, ask AWS Marketplace Seller Operations, or confirm with a product in Limited visibility. Preserve the finalized quantity and license on retries. If an agreement changes or a tenant moves, retain either the mapping's effective period or the mapping recorded at usage time so historical usage is not reassigned using today's mapping.
If your policy instead shares one license across several tenants, aggregate quantities for the same license, dimension, and hour within the SaaS. Sending a separate record per tenant does not cause AWS to sum records for the same billing bucket. Optional UsageAllocations tags can show departmental cost detail, but do not split agreements or perform tenant authorization (AWS’s SaaS usage metering guide).
This is how you connect the mechanism that attributes usage by agreement to the mechanism that records tenant usage inside the SaaS. AWS explains that, for products that support Concurrent Agreements, it tracks and bills usage per agreement (AWS’s SaaS usage metering guide). That page does not let you determine whether a separate invoice is issued per department. If the buyer cares about the invoice unit, ask the buyer to confirm with its AWS account representative. If the buyer only wants to see costs by department, the seller must first send tags in UsageAllocations of BatchMeterUsage. The buyer can then activate the AWS-generated cost allocation tags whose names start with aws:marketplace:isv: in the AWS Billing and Cost Management console, and view costs split by tag value (AWS’s SaaS usage metering guide).
What each venue can verify, and what remains to be confirmed
Even the same “tests passed” covers a different range depending on the venue. The table below divides four venues by what they can verify, the evidence they give, and what remains to be confirmed. The division is our own (Anti-Pattern Inc.’s) organization; AWS’s guidance underlies only the steps needed on live AWS.
| Venue | What it can verify | Evidence it gives | What remains to be confirmed |
|---|---|---|---|
| Application only (unit tests of functions and modules, and in-app integration tests that connect the DB and workers) | The application’s decisions and state transitions for given inputs. You can specify the time, the order of notifications, and entitlement values with test data and arguments | That decisions on synthetic data are as expected. You can run the same input repeatedly and compare before and after a change | The shape of SDK calls, AWS responses, authorization, and real purchases |
| SDK mock | The SDK client is replaced, and the test produces responses such as an empty page, a timeout, or UnprocessedRecords. This covers the part where the application builds requests and handles responses | That the application reacted correctly to the response it expected. This is not evidence that AWS actually returns that response | That the mock’s response matches the shape of the real API, authorization, and real purchases |
| Local reproduction environment (emulator) | Real SDK calls and response handling, with the SDK’s endpoint pointed at a local tool. Which APIs are supported and how closely they are reproduced differ by tool and version | That, with that version of that tool, the request could be sent and the response handled | That behavior matches AWS, IAM and authorization, the purchase UI, and billing. APIs the tool does not support |
| Live AWS (a product in Limited visibility) | A real purchase through the transition to the registration page, ResolveCustomer, entitlement retrieval, receiving notifications, and usage acceptance | That the integration worked on AWS (request IDs, AWS CloudTrail, the buyer’s billing screen, and so on) | Behavior outside the pricing model, product, and Region you tested, and billing at the actual selling price |
What to check before you choose a local reproduction environment
A local reproduction environment means a tool that imitates AWS APIs locally (an emulator). As one example, AWS announced on November 11, 2026 that AWS Emulator is now available (AWS announcement). AWS explains that the tool returns HTTP 501 and NotImplemented for operations it does not support, and that for operations it does support it aims to give the same results as AWS. It measures the degree of reproduction with fidelity tests (short programs that verify AWS behavior), and publishes the number of passing tests per service (the fidelity score) with each release (Fidelity in AWS Emulator).
AWS explains that the tool supports the APIs of services that have a model in its API models repository (Fidelity in AWS Emulator). For AWS Marketplace, ResolveCustomer and BatchMeterUsage are in the marketplace-metering model, and GetEntitlements is in the marketplace-entitlement-service model, in AWS’s API models repository (checked on November 15, 2026). Because unimplemented operations return 501, the explanations in AWS’s announcement and on the Fidelity page do not let you determine whether these three are implemented. The list of published fidelity tests (manifest.jsonl in aws-emulator-evaluation-suite) contained no test that calls these three operations when we retrieved it on November 15, 2026. AWS explains that, for behavior that has no fidelity test, the emulator may handle it correctly, but the tests do not confirm it (Checking whether your project works with AWS Emulator). Before you use the tool, run your own SDK calls against both the tool and live AWS, and compare the results.
AWS also indicates that you should not use the tool with production traffic or data, and that it does not replace testing of security settings on AWS (AWS Emulator product page). We recommend that you keep the checks of IAM permissions and authorization on live AWS. If you use another emulator, check the supported APIs, the degree of reproduction, and the version you tested in the same way, from the tool provider’s materials.
Choosing a venue from the failure you want to confirm
For each failure you want to confirm, choose from the table below which venue to use and what to test there. The allocation in the table is our proposed test placement. The IDs in the rightmost column refer to cases in the regression matrix. For each case’s preconditions, inputs, expected results, and procedure, see the regression matrix.
| Subject | Application only | SDK mock | Local reproduction environment | Live AWS | Regression cases |
|---|---|---|---|---|---|
| Access when there are no entitlements, and when retrieval fails | Fix the entitlement value (none, insufficient, sufficient) and test the decision | Return an empty response and a timeout, and test how they are handled differently | If the tool supports GetEntitlements, test the processing through the SDK | Verify actual entitlement retrieval and the IAM permission | R04 |
Entitlements after an empty page (pagination that retrieves the rest with NextToken) | Test the decision from already aggregated entitlements | Inject a page sequence | Check if pagination is supported | Verify actual data and authorization | R03 |
| Multiple-license isolation | Fixtures for two departments buying through one shared AWS account | Return the entitlements to be retrieved again separately for A and B | Depends on state and isolation support | Verify the identifiers and notifications issued by real purchases | R02, R06 |
| Duplicate or delayed events | Specify the input sequence. Also test the stopping positions that include the DB and the worker | Replace the GetEntitlements response used for rechecking (SaaS Subscription uses the state saved from notifications instead) | Use injection of events if available | Verify your own notification settings (rule, target permissions, DLQ) and the recovery procedure | R07, R08, R15, R16 |
| Immediately before/after a deadline | Supply the current time and reproduce | Return the error for a timestamp outside the allowed range (TimestampOutOfBoundsException) | Depends on the clock feature’s scope | Verify AWS deadlines and billing outcomes | R09, R10, R14 |
| Usage responses and resends | Test finalizing the quantity and how to choose the records to resend | Return the UnprocessedRecords and DuplicateRecord responses | If the tool supports BatchMeterUsage, check it | Verify API acceptance, matching of records, and the reflection in billing | R11, R12, R13 |
| IAM, purchase UI, and billing | Cannot establish live success | Cannot establish live success | Cannot establish live success | Verification required | None |
AWS’s verification procedures differ by pricing model; use AWS’s SaaS Contract and SaaS Subscription integration guides to select the live tests required for your model.
Development tests and pre-launch checks
The license isolation between the two departments can go into the tests you run on every change. Because you can repeat the processing with the same data, you can also compare against the earlier behavior when you change how tenants are assigned. Deadline decisions and recovery from retrieval failures are also candidates for this layer.
Run tests that include the SDK and persistence with the components connected. If you can reuse the existing cases here, you can examine the differences that the connection introduces. Before launch and at important configuration changes, the development team needs to verify on AWS the purchase-to-registration flow, actual authorization and notifications, and the usage acceptance that applies to its pricing model.
Whoever runs the tests should also record the results by the same venues. “Application decisions passed; SDK mock response handling passed; connection to the local reproduction environment not run; live AWS not yet confirmed” tells the next engineer what remains. For how to write the evidence to retain from the live environment, see the live testing boundaries article.
Articles to read by purpose
See the following Deshima articles that are closest to what you want to confirm.
| What you want to confirm | Deshima article | What you will learn |
|---|---|---|
| Pre-launch checks | What the AWS Marketplace SaaS review checks | The checks for each scenario from a new purchase to usage submission, and which parts AWS’s own verification covers and which you supplement yourself |
| Mapping agreements to tenants | How to map AWS Marketplace agreements to SaaS tenants | The information received at the registration URL, how tenants map to licenses, updates when an agreement changes or ends, and the mapping scenarios to check before launch |
| Several agreements in the same AWS account | What are AWS Marketplace Concurrent Agreements? | The identifiers and notifications for handling several agreements, the key points of migration, and what to check in tests for several agreements |
| Ending an agreement | Handling cancellations and refunds on AWS Marketplace | Cancellation and refund procedures, the unit at which the SaaS stops access, and the final usage report for metered products |
| Implementing usage submission | AWS Marketplace metering implementation | The values to pass to BatchMeterUsage, finalizing one hour of quantity, resending, and the final submission when an agreement ends |
| When usage is not accepted | AWS Marketplace Metering Not Accepted? Debug BatchMeterUsage Results | Where to look for each Status in Results and for UnprocessedRecords, and the conditions under which you may resend |
| Deadlines and clocks | Testing Time-Dependent AWS Marketplace Integrations | Processing that does not run when you advance the clock, period boundaries, and the deadlines that remain for usage submission |
| Duplicate, delayed, and out-of-order notifications | Testing Duplicate, Delayed, and Out-of-Order Marketplace Events | Rechecking against old notifications, stopping after a DB update, and reprocessing from the Amazon EventBridge DLQ |
| Running tests in CI on every change | Running AWS Marketplace Integration Tests in CI | A sample that verifies license isolation and deadline boundaries on every run, with synthetic data and no connection to AWS |
| How to retain results from live AWS | Which AWS Marketplace Tests Still Need a Real AWS Environment? | How to record what you verified locally in the application’s decisions and the integration that worked on AWS as separate pieces of evidence |
| The list of cases | A Regression Test Matrix for AWS Marketplace SaaS | The preconditions, inputs, expected results, verification venues, evidence, and procedures of 16 cases |
Whichever article you start from, record with each result which of the four venues produced it.