The Amazon Web Services Marketplace AI Metering Agent Skill (
aws-marketplace-metering) helps an AI coding agent integrate your SaaS product's usage reporting with the
BatchMeterUsage API. The skill is a curated package of instructions and reference material that guides your AI coding agent through building, deploying, and testing the metering integration. To get the skill on demand without checking it out locally, install the
Amazon Web Services MCP Server in your coding agent; the agent then discovers and loads the skill at runtime. The skill source is also available on
GitHub. For more information, see
Get started with the Amazon Web Services Marketplace AI Metering Agent Skill on the Amazon Web Services Marketplace blog.
Amazon Web Services Marketplace is introducing Concurrent Agreements, enabling buyers to make multiple purchases per Amazon Web Services account. Starting June 1, 2026, new SaaS products must use CustomerAWSAccountId (instead of CustomerIdentifier), LicenseArn (instead of ProductCode) to support this feature. BatchMeterUsage does not support CustomerIdentifier for new integrations. Existing integrations continue to work. Review the new integration for Concurrent Agreements here. For additional implementation details, see BatchMeterUsage code example with LicenseArn in the Amazon Web Services Marketplace Seller Guide. To post metering records for customers, SaaS applications call
BatchMeterUsage, which is used for metering SaaS flexible consumption pricing (FCP). Identical requests are idempotent and can be retried with the same records or a subset of records. Each
BatchMeterUsage request is for only one product. If you want to meter usage for multiple products, you must make multiple
BatchMeterUsage calls.
Usage records should be submitted in quick succession following a recorded event. Usage records aren't accepted 24 hours or more after an event. At the end of each billing cycle, a 6-hour grace period applies. We accept usage records for the previous billing month until 06:00 UTC on the first day of the next month. For example, you must submit March usage records before 06:00 UTC on April 1. On April 1 at 05:00 UTC, you can still submit records for March 31 (within the 6-hour grace period). After 06:00 UTC on April 1, March records are rejected regardless of the normal 24-hour submission window. After this grace period, we return a
TimestampOutOfBoundsException error.
BatchMeterUsage can process up to 25
UsageRecords at a time, and each request must be less than 1 MB in size.
Vendor-metered taggingBatchMeterUsage supports vendor-metered tagging. Optionally, you can split the usage in a
UsageRecord into buckets by including
UsageAllocations, where each
UsageAllocation has a set of
Tags that you define. Vendor-metered tagging doesn't change the price, dimensions, or the total usage that you report. It gives buyers a more granular view of their usage of your product so they can perform cost allocation in the Amazon Web Services Billing and Cost Management console. For more information, see
Vendor-metered tagging and
BatchMeterUsage with usage allocation tagging code example in the
Amazon Web Services Marketplace Seller Guide.
BatchMeterUsage returns a list of
UsageRecordResult objects, which have each
UsageRecord. It also returns a list of
UnprocessedRecords, which indicate errors on the service side that should be retried.
For Amazon Web Services Regions that support
BatchMeterUsage, see
BatchMeterUsage Region support.
For an example of
BatchMeterUsage, see
BatchMeterUsage code example in the
Amazon Web Services Marketplace Seller Guide.