Problem description
If you use STS to grant a temporary permission for OSS operations such as upload and download, you need to solve the following errors.
ErrorCode: AccessDenied
ErrorMessage: Access denied by authorizer's policy.
Cause
This error is caused by the authorization caused by the policy parameter in obtaining the STS token code. As shown in the following Demo code for obtaining a token in Java, the Policy setting represents the policy permission setting of the token, and the final token permission is the intersection of the user role authorization and policy permission in the code.

Solution
In this scenario the error to the code in the Policy parameters of authorization Policy, combined with their own call the OSS interface API methods to troubleshoot Policy authorization in whether to include related information please refer to STS to grant temporary authorizations to access OSS.
Scope
- OSS
- Resource Access Management (RAM)