- Newest
- Most votes
- Most comments
Hi Jeremy,
I've seen this issue occur when a browser plugin or extension interferes with the AWS Marketplace integration.
To troubleshoot:
- Test via CLI: Use the AWS CLI to make the ResolveCustomer call with the token to isolate whether this is a browser-specific issue
- Verify account access: Ensure you're making the ResolveCustomer call from the seller account, or have assumed the appropriate cross-account access role
- Check subscription status: Confirm the token corresponds to an active subscription
For additional context on the ResolveCustomer API, see the AWS Marketplace Metering Service documentation.
Based on your description, there are several potential causes for the InvalidTokenException during the AWS Marketplace audit while your test account works fine.
The key difference between your test account success and the audit failure appears to be related to token validity. Here are some insights:
-
Token Validity: The InvalidTokenException (as opposed to ExpiredTokenException) suggests the token itself is invalid rather than expired. This could indicate the audit is using synthetic test tokens that aren't actually valid for ResolveCustomer API calls.
-
Response Time Difference: The quick failure time (under 100ms) compared to successful test account resolutions (~3.5s) suggests the tokens are being rejected immediately by the AWS Marketplace Metering Service rather than being processed.
-
Fulfillment URL Requirements: Ensure your fulfillment URL starts with "https://" and is properly formatted. The URL must be publicly accessible and should follow the format: https://your-saas-app.com/fulfillment.
-
Token Processing: Your code appears to be correctly extracting the token from the POST request and using it with the ResolveCustomer API. The issue is likely not in your token handling logic.
-
Test vs. Audit Environment: The audit system may be using a different mechanism for token generation than what's used for actual customer subscriptions. While your test account uses real subscription tokens, the audit might use synthetic tokens for validation purposes.
Recommendations:
- Test your fulfillment endpoint with a variety of token scenarios
- Ensure your endpoint responds appropriately even when receiving invalid tokens
- Add more detailed error handling to distinguish between different token validation failures
- Consider implementing a fallback mechanism for audit scenarios
You might want to contact AWS Marketplace support directly about this issue, as they can provide specific insights about how the audit system tests fulfillment URLs and what might be causing the discrepancy between test accounts and audit validation.
Sources
Troubleshooting SaaS products - AWS Marketplace
Code examples for SaaS product integration - AWS Marketplace
ResolveCustomer - AWS Marketplace
Work with SaaS products using the AWS Marketplace APIs - AWS Marketplace
Relevant content
- asked 4 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 2 years ago
