开发者社区> 问答> 正文

OSS SignatureDoesNotMatch


var OSS = require('ali-oss');
var STS = OSS.STS;

var sts = new STS({
    accessKeyId: conf.AccessKeyId,
    accessKeySecret: conf.AccessKeySecret
  });

co(function* (){
    var token = yield sts.assumeRole(RoleArn,Policy,3600,'RoleSessionName');
    var client = new OSS.Wrapper({
      region: "oss-cn-beijing",
      accessKeyId: token.credentials.AccessKeyId,
      accessKeySecret: token.credentials.AccessKeySecret,
      stsToken: token.credentials.SecurityToken,
      bucket:"trtd"
    });
    res.send(client);
  }).catch(function (err) {
    console.log(err);
  });
代码如上,最后报错


{ [Error: SignatureDoesNotMatch: Specified signature is not matched with our calculation.]
  status: 400,
  code: 'SignatureDoesNotMatch',
  message: 'SignatureDoesNotMatch: Specified signature is not matched with our calculation.',







展开
收起
云天地 2016-11-25 10:58:55 9775 0
4 条回答
写回答
取消 提交回答
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
OSS运维进阶实战手册 立即下载
《OSS运维基础实战手册》 立即下载
OSS运维基础实战手册 立即下载