简体   繁体   中英

Amazon SP-API getOrder Roles may not be assumed by root accounts

I have a client that has entrusted me with his seller central access key id and secret access key but when I use it creating IAM role and user policy and calling the API. It returns this call is for getOrder.

"getOrder Roles may not be assumed by root accounts"

What is the workaround for this?

this is the actual response from the API

Error executing "AssumeRole" on "https://sts.us-east-1.amazonaws.com"; AWS HTTP error: Client error: `POST https://sts.us-east-1.amazonaws.com` resulted in a `403 Forbidden` response: 
<ErrorResponse xmlns="https://sts.amazonaws.com/doc/2011-06-15/">
  <Error>
    <Type>Sender</Type>
    `enter code here`<Code>AccessDeni (truncated...)
 AccessDenied (client): Roles may not be assumed by root accounts. - <ErrorResponse xmlns="https://sts.amazonaws.com/doc/2011-06-15/">
  <Error>
    <Type>Sender</Type>
    <Code>AccessDenied</Code>
    <Message>Roles may not be assumed by root accounts.</Message>
  </Error>
  <RequestId>0123456789</RequestId>
</ErrorResponse>

You shoudn't use root user for day-to-day operations on your account. Instead you should use IAM user . If you don't have any IAM users for your own use, you have to create one with permissions to assume a role. Then you can use the user to assume the role that you are trying to use.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM