【发布时间】:2017-05-23 16:00:40
【问题描述】:
我正在测试 AWS C++ SDK。我已将我的区域 (eu-central-1) 设置为环境变量,并在 ~/.aws/config 中设置为:http://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-credentials.html
我正在测试 AWS 提供的这个示例代码:https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/cpp/example_code/s3/put_object.cpp
问题是我收到此错误:
ExceptionName: AuthorizationHeaderMalformed Message: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'eu-central-1'
为什么不使用区域 eu-central-1 ?
【问题讨论】:
-
怀疑适用于 C++ 的 AWS 开发工具包不使用 ~/.aws/config 文件或环境变量。见docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/…。
标签: c++ amazon-web-services amazon-s3 aws-sdk