Internal Server error calling APIs


#1

My setup is on Python3 using Python’s requests library.

I have the app created from Seller Central and LWA tokens from https://developer.amazon.com/. I’m able to authorize requests and generate an access token.

I’m also able to assume the role and parse the results in my request:

def assume_role():
    client = boto3.client("sts")
    response = client.assume_role(
        RoleArn=ARN_ROLE,
        RoleSessionName=uuid4().hex
    )
    content = response.get("Credentials")

Here is the request I’m sending:

{ 'method': 'GET', 'url': 'https://sandbox.sellingpartnerapi-na.amazon.com/orders/v0/orders/?MarketplaceIds=ATVPDKIKX0DER', 'headers': { 'user-agent': 'Jeto/build1611 (Language=Python3; Host=sellerscentral.example.com)', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'x-amz-security-token': 'FwoGZ..........', 'x-amz-date': '20201201T062643Z', 'host': 'sandbox.sellingpartnerapi-na.amazon.com', 'x-amz-access-token': 'Atza......', 'Authorization': 'AWS4-HMAC-SHA256 Credential=ASIAUC2DTN...../20201201/us-east-1/execute-api/aws4_request, SignedHeaders=host;user-agent;x-amz-access-token;x-amz-date, Signature=90ac8b1a7f6562eada1063a7ec0de04f4fc9d2e5ae006cc6b6adac2ce4812ba9', 'Content-Type': 'application/x-amz-json-1.0' }, '_cookies': < RequestsCookieJar[] > , 'body': None, 'hooks': { 'response': [] }, '_body_position': None }

I’m getting a 500 error code with the following error description: The region is us-east-1 :

{
  "errors": [
    {
      "message": "We encountered an internal error. Please try again.",
     "code": "InternalFailure"
    }
  ]
}