By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,998 Members | 2,825 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,998 IT Pros & Developers. It's quick & easy.

Use STS to access OSS - OSS Access Key Id you provided does not exist in our records

P: 51
Hi,
I'm trying to use STS to access OSS as described here. My scenario is following:
1) Client react app calls FC Compute Function via API Gateway and submit some information
2) Function validate the information and if it is ok then function calls sts.assumeRole and specify permission to GET* for all resources in OSS using AccessKeyId and AccessKeySecret of sub-account
3) The new STS temporary token is created and it is returned to client
4) Client initialize OSS client with returned AccessKeyId, AccessKeySecret and SecurityToken
5) Client try to download selected file
6) This error is thrown:
Error: The OSS Access Key Id you provided does not exist in our records.
at Client.requestError$ (aliyun-oss-sdk.js:619)
at tryCatch (aliyun-oss-sdk.js:15266)
at Generator.invoke [as _invoke] (aliyun-oss-sdk.js:15500)
at Generator.prototype.(anonymous function) [as next] (http://localhost:3000/static/js/bundle.js:126516:21)
at onFulfilled (aliyun-oss-sdk.js:6100)

Is there something I'm doing wrong or there could be some problem on OSS?

Thanks for any help,
Marek
Jul 16 '18 #1
Share this Question
Share on Google+
1 Reply


P: 34
Just like Stack Overflow, post your code is you need help with a software development issue.

Include the policy that you are assuming.

The key message is: The OSS Access Key Id you provided does not exist in our records.

Check your code to make sure that you are passing the correct values received from STS to OSS unchanged. The security token is a very long string (base64 encoded credentials).

Two tips that I do on problems like this. I check to make sure that my code works on public read files. Often I find silly mistakes with region handling, etc. Another test is to use normal credentials in-place of STS credentials to check my code. Once those two tests work and all error handling is in place, I then only have to debug the STS logic.
Jul 16 '18 #2

Post your reply

Sign in to post your reply or Sign up for a free account.