Testing in a sandbox - AWS Partner Central

Testing in a sandbox

A sandbox provides users of AWS Partner Central APIs a secure and isolated environment to test and validate their API interactions, ensuring smooth operation before promoting their solution to the production environment. AWS offers a dynamic sandbox to Partner Central API users that returns responses similar to the production environment. AWS does not provide a user interface to ACE Pipeline Manager in the sandbox environment. Therefore, partners need to rely on the programmatic responses to test their solutions.

Access to the sandbox environment

Partners gain access to the testing environment as soon as they link their AWS account to the Partner Central account. For more information, see Linking your AWS Marketplace account to AWS Partner Central account. Each request includes a Catalog parameter, which determines the data environment. When Catalog is set to AWS, it references production data, and when it's set to Sandbox, it references sandbox data.

How to use the sandbox

  1. Create an IAM role:

    Create an IAM role in the AWS account linked with your AWS Partner Central account.

  2. Assign Policy:

    Assign the following policy to the IAM role. For more information, see Adding and removing IAM identity permissions.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "partnercentral:CreateOpportunity", "partnercentral:UpdateOpportunity", "partnercentral:ListOpportunities", "partnercentral:GetOpportunity", "partnercentral:GetAwsOpportunitySummary", "partnercentral:ListSolutions", "partnercentral:AssociateOpportunity", "partnercentral:DisassociateOpportunity", "partnercentral:AssignOpportunity", "partnercentral:SubmitOpportunity", "partnercentral:AcceptEngagementInvitation", "partnercentral:CreateEngagementInvitation", "partnercentral:RejectEngagementInvitation", "partnercentral:GetEngagementInvitation", "partnercentral:ListEngagementInvitations", "partnercentral:StartEngagementFromOpportunityTask", "partnercentral:StartEngagementByAcceptingInvitationTask", "partnercentral:CreateResourceSnapshotJob", "partnercentral:StartResourceSnapshotJob", "partnercentral:CreateEngagement" ], "Resource": "*", "Condition": { "StringEquals": { "partnercentral:Catalog": "Sandbox" } } }, { "Effect": "Allow", "Action": [ "aws-marketplace:ListEntities", "aws-marketplace:DescribeEntity" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "aws-marketplace:SearchAgreements", "aws-marketplace:DescribeAgreement" ], "Resource": "*", "Condition": { "StringEquals": { "aws-marketplace:PartyType": "Proposer" } } } ] }
  3. Use IAM role credentials:

    Use the credentials (secret key and access key) of this IAM role in your solution to perform the API actions.

Important details about the sandbox environment

  1. Data refresh: Once per year, AWS refreshes the data in the sandbox environment (typically at the beginning of the year). After this refresh, you may lose some of the data in your testing environment.

  2. Testing scope: The sandbox environment is typically used for functional testing and not for testing scalability or performance. The sandbox supports a maximum of one request per second.

Testing AWS actions

During the testing phase, it is often necessary to simulate AWS actions. This simulation enables partners to thoroughly test the complete end-to-end flow of their integration with AWS services.

  1. Simulating AWS originated opportunity creation: To simulate the creation of an opportunity that originates from AWS within the sandbox environment, partners should include "Catalog": "Sandbox" and "Origin": "AWS Referral" in the payload of the CreateOpportunity action.

    Sample Payload:

    { "Catalog": "Sandbox", "Origin": "AWS Referral", "OpportunityIdentifier": "O123456", "Title": "Test Opportunity", ... }
  2. Changing review status on a partner-originated opportunity: To simulate updates or other actions on an existing AWSopportunity, use the UpdateOpportunity action with "Catalog": "Sandbox" and Lifecycle.ReviewStatus: “Approved” or “Action Required” in the payload.

    Sample payload:

    { "Catalog": "Sandbox", "Origin": "AWS Referral", "OpportunityIdentifier": "O123456", "Title": "Updated Test Opportunity", "Lifecycle": { "ReviewStatus": "Approved" } ... }

Testing events in the sandbox environment

Partners can consume opportunity events from the sandbox environment to help test the event-based implementations. Set up EventBridge in the same AWS account with rules to listen for sandbox events by specifying catalog: sandbox in the event details. For more information, see Selling API Events.

Example event rule:

{ "source": ["aws.partnercentral-selling"], "detail": { "catalog": ["Sandbox"] } }

Event rules that specify catalog as Sandbox will only match events coming from the sandbox, generated by the actions you perform in the sandbox environment.

Additional testing notes

  1. Testing AssociateOpportunity action:

    1. Use the default solution "S-1234567" for testing the AssociateOpportunity action.

    2. For testing Marketplace offers, use a real offer ID from your account.

Getting help

If you encounter challenges integrating your CRM with AWS, or if you need to test a specific scenario not covered here, please reach out to support by raising a case through the following steps:

  1. Sign in to the AWS Partner Central with your AWS Partner Network credentials.

  2. On the Support Center for Partner Central, choose Open New Case to log a new case. Complete the fields as follows:

    1. Type of support case: AWS Partner Central.

    2. Question regarding: Partner Central Tools or ACE leads and opportunities.

    3. Get specific: Select the most appropriate CRM Integration case type.

    4. Subject: Include a brief description of the request.

    5. Description: Provide a detailed description of issues, questions, errors, and troubleshooting steps.

    6. Attachments: Include logs and screenshots, where applicable.