Tutorial: Convert an Amazon MWS application into a Selling Partner API application

The migration workflow converts an Amazon MWS application into a hybrid Selling Partner API application.

Migration workflow

The migration workflow converts an Amazon MWS application into a hybrid Selling Partner API application. A hybrid application can make API calls to both Amazon MWS and SP-API. With a hybrid application, you have functionality from both services and zero application downtime during the migration process.

The following diagram provides an overview of the migration workflow steps.

Migration workflow overviewMigration workflow overview

Migration workflow steps:

  1. Request data access for your Selling Partner API application. (Developer Profile)
  2. Create and configure IAM resources. (User, role, policy, and AWS STS)
  3. Convert your Amazon MWS application into a hybrid Selling Partner API application. (Developer Central)
  4. Implement OAuth authorization workflow. (Login with Amazon (LWA) token
  5. Connect to the Selling Partner API. (Java SDK)
  6. Publish your hybrid Selling Partner API application. (Marketplace AppStore)
  7. Migrate your Amazon MWS authorizations into SP-API OAuth code. (Authorizations API)
  8. Call your Selling Partner API endpoints. (Selling Partner API endpoint)

Migration Tutorial

This tutorial explains how to convert an Amazon MWS application to a hybrid Selling Partner API application.

Prerequisites

  • A registered Amazon MWS application that is published in the Marketplace Appstore.
  • An Amazon Web Services (AWS) account. To create an account, sign up for AWS.

Step 1. Request the data access that your Selling Partner API application requires

  1. Sign into Seller Central with the credentials associated with your Amazon MWS developer account.
  2. On the Partner Network menu, click Develop Apps.
  3. On the Developer Central page, click Your Developer Profile.
  4. On the Developer Profile page, in the Data Access section, select the roles that your applications require and submit the form. For more information on choosing or requesting roles, see Roles in the Selling Partner API.
  5. Click Register.

The Developer Support team will evaluate your request and reply to your support case once their review is completed. This process may take several days depending on your profile responses.

Note: You cannot change your Developer Profile while it is under review. However, you can monitor your registration status by visting Developer Central and viewing the instructions on the Your developer registration is under review banner.

Step 2. Create and configure IAM resources

Some AWS Identity and Access Management (IAM) resources are required for you to convert your Amazon MWS application into a Selling Partner API application, including an IAM user, IAM policy, and an IAM role. When you create your IAM role, you also generate an Amazon Resource Name (ARN), which is a unique identifier for your IAM role. Make sure to take note of the IAM role ARN when you create and configure your IAM resources - you need this IAM role ARN when you convert your Amazon MWS application into a hybrid Selling Partner API application in Step 3.

You can create and configure your IAM resources in two ways:

  • To programmatically create and configure the IAM resources, see the Selling Partner API on AWS Quick Start. The Selling Partner API on AWS Quick Start includes an AWS CloudFormation template that you deploy in your AWS account to programmatically create all of the required IAM policies and roles.

  • To manually create and configure the IAM resources, see Creating and configuring IAM policies and entities in the Selling Partner API Developer Guide.

Step 3. Convert your Amazon MWS application into a hybrid Selling Partner API application

  1. Sign into Seller Central using the credentials that you used to register as a developer.
  2. In the Partner Network menu, click Develop Apps.
  3. On the Developer Central page, next to your Amazon MWS application, click Edit App.
  4. On the App registration form, for API Type, choose SP-API and MWS. This selection populates the form with your app details.
  5. In the IAM ARN box, paste the ARN for the IAM role that you created in Step 2. Create and configure IAM resources. If you are unsure of this value, you can find the ARN depending on how you created the IAM role:
    • If you created your IAM resources programmatically using the Selling Partner API on AWS Quick Start Deployment Guide, paste the ARN that you copied in Post-deployment steps - Copy the IAM role ARN.
    • If you created your IAM resources manually using the steps in the Selling Partner API Developer Guide, paste the ARN for the IAM role that you copied in Step 4. Create an IAM role. This IAM role should also have the AWS Security Token Service (AWS STS) policy attached.
    • To view the ARN in the AWS Management Console, sign into the IAM Dashboard and in the left navigation pane, choose Roles. Search for and select the SP-API role that you created. On the Summary page, copy the Role ARN.
  6. In the Roles section, select all roles required by your application. For more information on choosing or requesting roles, see Roles in the Selling Partner API.
  7. Click Save and Exit to complete the registration.

After you submit the registration, you will have a hybrid Selling Partner API application in Draft status. You are now ready to set up and test an authorization workflow.

Step 4. Implement an authorization workflow

Set up and test an authorization workflow for your hybrid Selling Partner API application. For more information, see Authorizing Selling Partner API applications in the Selling Partner API Developer Guide. When you have finished testing your authorization workflow, be sure to convert your test authorization workflow to a production authorization workflow.

Step 5. Connect to the Selling Partner API

Set up a workflow for calling operations in the Selling Partner API. This workflow includes exchanging Login with Amazon (LWA) tokens, constructing URIs, adding headers, and creating and signing requests. To set up this workflow, you can generate and use an SDK that includes LWA token exchange and authentication. For more information, see Generating a Java SDK with LWA token exchange and authentication and Connecting to the Selling Partner API using a generated Java SDK in the Selling Partner API Developer Guide.

For information about connecting to the Selling Partner API sandbox, see Selling Partner API sandbox in the Selling Partner API Developer Guide.

Step 6. Publish your hybrid Selling Partner application in the Marketplace Appstore

  1. Sign into Seller Central using the credentials that you used to register as a developer.
  2. On the Partner Network menu, click Develop Apps.
  3. On the Developer Central page, locate your application. Click the Edit App drop-down and then click Edit Listing.
  4. On the App registration form, for API Type, choose SP-API and MWS. This selection populates the form with your app details.
  5. Complete the remaining fields and submit the form.

After completing the final screen, your hybrid Selling Partner application will be published to the Marketplace Appstore. This process can take 5 to 10 business days.

Step 7. Migrate Amazon MWS authorizations to Selling Partner API authorizations

Note: Confirm that your Selling Partner API application is published in the Marketplace Appstore prior to migrating your existing Amazon MWS authorizations to Selling Partner API authorizations.

Migrate your existing Amazon MWS authorizations to Selling Partner API authorizations. For more information, see the Authorization API Use Case Guide.

Step 8. Migrate your Amazon MWS calls to Selling Partner API calls

The final step is to update your application so that actions that previously triggered calls to Amazon MWS operations now trigger calls the corresponding Selling Partner API operations. See Mapping APIs from Amazon MWS to the Selling Partner API to see which Selling Partner API operations correspond to the Amazon MWS operations that your application has been calling.