AWS marketplace high security documentation change
Summary
Added documentation for Amazon Bedrock AgentCore Runtime integration with MeterUsage, including IAM role requirements, testing procedures, error handling updates, and vendor-tagging limitations.
Security assessment
The change enforces using IAM roles (not long-term keys) for AgentCore MeterUsage calls, reducing exposure to credential leaks. It also mandates terminating containers on metering exceptions to prevent unauthorized use. These updates directly address security best practices for authentication and usage control.
Diff
diff --git a/marketplace/latest/userguide/container-metering-meterusage.md b/marketplace/latest/userguide/container-metering-meterusage.md index 2e5f1ca42..dacd9281b 100644 --- a//marketplace/latest/userguide/container-metering-meterusage.md +++ b//marketplace/latest/userguide/container-metering-meterusage.md @@ -5 +5 @@ -Custom metering prerequisitesTesting MeterUsage integrationError handling for MeterUsageVendor-metered tagging (Optional)Code example +Custom metering prerequisitesTesting MeterUsage integration for ECS and EKSTesting MeterUsage integration for AgentCoreError handling for MeterUsage(Optional) Vendor-metered taggingCode example @@ -14,0 +15,2 @@ For Amazon ECS deployments, your software must use [Amazon ECS task IAM](https:/ +For Amazon Bedrock AgentCore Runtime deployments, your software must use the [AgentCore Runtime execution role](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-permissions.html#runtime-permissions-execution) to sign the API call for the `MeterUsage` API operation. Long-term access keys are not supported. + @@ -46 +48,3 @@ Free trial and prepaid entitlement are tracked on an hourly level. As a result, - * Testing MeterUsage integration + * Testing MeterUsage integration for ECS and EKS + + * Testing MeterUsage integration for AgentCore @@ -50 +54 @@ Free trial and prepaid entitlement are tracked on an hourly level. As a result, - * Vendor-metered tagging (Optional) + * (Optional) Vendor-metered tagging @@ -65 +69 @@ Before publishing the product, you must do the following: - 2. Use an AWS Identity and Access Management (IAM) role for the task or pod running your application with the IAM permissions necessary to call `MeterUsage`. The IAM managed policy `AWSMarketplaceMeteringRegisterUsage` has these permissions. For more information about the policy, see [ AWSMarketplaceMeteringFullAccess](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSMarketplaceMeteringFullAccess.html) in the _AWS Managed Policy Reference_. + 2. Use an AWS Identity and Access Management (IAM) role for the task, pod, or AgentCore Runtime endpoint running your application with the IAM permissions necessary to call `MeterUsage`. The IAM managed policy `AWSMarketplaceMeteringRegisterUsage` has these permissions. For more information about the policy, see [ AWSMarketplaceMeteringFullAccess](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSMarketplaceMeteringFullAccess.html) in the _AWS Managed Policy Reference_. @@ -74 +78 @@ Before publishing the product, you must do the following: -## Testing `MeterUsage` integration +## Testing `MeterUsage` integration for ECS and EKS @@ -78 +82 @@ Use the `MeterUsage` operation to test your integration before submitting your i -Call `MeterUsage` from the container images by running your product on Amazon Elastic Container Service (Amazon ECS) or Amazon Elastic Kubernetes Service (Amazon EKS) with the AWS account you are using to list the product on AWS Marketplace. Your metering integration must dynamically set the AWS Region, rather than hard coding it. However, when testing, launch at least one Amazon ECS task or Amazon EKS pod containing your paid container in the US East (N. Virginia) Region so that the AWS Marketplace operations team can verify your work with the logs in that Region. +Call `MeterUsage` from the container images by running your product on Amazon Elastic Container Service (Amazon ECS) or Amazon Elastic Kubernetes Service (Amazon EKS) with the AWS account you use to list the product on AWS Marketplace. Your metering integration must dynamically set the AWS Region, rather than hard coding it. However, when testing, launch at least one Amazon ECS task or Amazon EKS pod containing your paid container in the US East (N. Virginia) Region so that the AWS Marketplace operations team can verify your work with the logs in that Region. @@ -90,0 +95,12 @@ You can't fully test the integration until your product is published with all th +## Testing MeterUsage integration for AgentCore + +Use the `MeterUsage` operation to test your integration before submitting your image to AWS Marketplace for publishing. + +Call `MeterUsage` from the container images by running your product on Amazon Bedrock AgentCore with the AWS account you use to list the product on AWS Marketplace. Your metering integration must dynamically set the AWS Region, rather than hard coding it. However, when testing, launch at least one Amazon Bedrock AgentCore agent containing your paid container in the US East (N. Virginia) Region so that the AWS Marketplace operations team can verify your work with the logs in that Region. + +You don’t need to aggregate hourly usage records. Call `MeterUsage` on every agent invocation with the usage for that invocation. + +You must use the latest released version of the AWS SDK for your language. This automatically populates the `ClientToken` parameter with an auto-generated value to help with idempotency. Prior releases of the SDK that do not populate this field will not work for `MeterUsage` calls from within Amazon Bedrock AgentCore. Due to a network issue, you must re-use the same exact request when retrying. Doing that ensures that the requests are treated idempotently. + +Due to differences in expected metering behavior between Amazon Bedrock AgentCore and other container products, we do not recommend sharing the same container image for use on Amazon Bedrock AgentCore and on Amazon ECS or EKS. + @@ -93 +109 @@ You can't fully test the integration until your product is published with all th -If your container image integrates with the `MeterUsage` operation and receives an exception other than `ThrottlingException` at container startup, you should terminate the container to prevent unauthorized use. +Call `MeterUsage` setting the `DryRun` parameter to true at container startup to validate that metering integration is working. If your container image integrates with the `MeterUsage` operation and receives an exception other than `ThrottlingException` at container startup, you should terminate the container to prevent unauthorized use. @@ -95 +111 @@ If your container image integrates with the `MeterUsage` operation and receives -Exceptions other than `ThrottlingException` are thrown only on the initial call to `MeterUsage`. Subsequent calls from the same Amazon ECS task or Amazon EKS pod do not throw `CustomerNotSubscribedException` even if the customer unsubscribes while the task or pod is still running. These customers are still charged for running containers after they unsubscribe and their usage is tracked. +Exceptions other than `ThrottlingException` are thrown only on the initial call to `MeterUsage`. Subsequent calls from the same Amazon ECS task or Amazon EKS pod or AgentCore Runtime endpoint do not throw `CustomerNotSubscribedException`, even if the customer unsubscribes while the task or pod is still running. Those customers are still charged for running containers after they unsubscribe, and their usage is tracked. @@ -99 +115 @@ See [MeterUsage](https://docs.aws.amazon.com/marketplacemetering/latest/APIRefer -## Vendor-metered tagging (Optional) +## (Optional) Vendor-metered tagging @@ -103 +119,5 @@ Vendor-metered tagging helps Independent Software Vendors (ISVs) give the buyer -There are many ways to tag a buyer's software usage. One way is to first ask your buyers what they want to see in their cost allocation. Then you can split the usage across properties that you track for the buyer’s account. Examples of properties include `AccountId`, `Business Unit`, `Cost Centers`, and other relevant metadata for your product. These properties are exposed to the buyer as tags. Using tags, buyers can view their costs split into usage by the tag values in their AWS Billing Console ([https://console.aws.amazon.com/costmanagement/](https://console.aws.amazon.com/costmanagement/)). Vendor-metered tagging doesn't change the price, dimensions, or the total usage that you report. It allows your customer to view their costs by categories appropriate to your product. +###### Note + +Vendor-metered tagging is not supported for metering requests for Amazon Bedrock AgentCore products. + +You have several ways to tag a buyer's software usage. One is to first ask your buyers what they want to see in their cost allocation. Then you can split the usage across properties that you track for the buyer’s account. Examples of properties include `AccountId`, `Business Unit`, `Cost Centers`, and other relevant metadata for your product. These properties are exposed to the buyer as tags. Using tags, buyers can view their costs split into usage by the tag values in their AWS Billing Console ([https://console.aws.amazon.com/costmanagement/](https://console.aws.amazon.com/costmanagement/)). Vendor-metered tagging doesn't change the price, dimensions, or the total usage that you report. It allows your customer to view their costs by categories appropriate to your product. @@ -109 +129 @@ In a common use case, a buyer subscribes to your product with one AWS account. T -Sellers can aggregate the metering records for resources with the same set of tags instead of aggregating usage for all resources. For example, sellers can construct the metering record that includes different buckets of `UsageAllocations`. Each bucket represents `UsageQuantity` for a set of tags, such as `AccountId` and `BusinessUnit`. +Sellers can aggregate the metering records for resources with the same set of tags instead of aggregating usage for all resources. For example, sellers can construct the metering record that includes different `UsageAllocations` buckets. Each bucket represents the `UsageQuantity` for a set of tags, such as `AccountId` and `BusinessUnit`. @@ -115 +135 @@ In the following diagram, **Resource 1** has a unique set of `AccountId` and `Bu - +