使用AWS S3存储桶的授权错误

时间:2019-06-02 19:02:00

标签: javascript amazon-web-services node.js cloud-storage amazon-s3

node s3_listbuckets.js
Error TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["Authorization"]
    at ClientRequest.setHeader (_http_outgoing.js:470:3)
    at new ClientRequest (_http_client.js:219:14)
    at Object.request (https.js:305:10)
    at features.constructor.handleRequest 
...
XXX
... 
{
  message: 'Invalid character in header content ["Authorization"]',
  code: 'NetworkingError',
  region: 'XXX',
  hostname: 's3.XXX.amazonaws.com',
  retryable: true,
  time: XXX
}

1 个答案:

答案 0 :(得分:0)

找出我的AWS凭证复制粘贴了一个额外的字符,该字符可以与其他AWS服务一起使用,但不适用于S3 Bucket。 “”