【发布时间】:2019-02-19 10:22:20
【问题描述】:
我正在尝试通过 cli 访问我的 S3 存储桶。我已经设置好了所有东西,例如有一个 credentials 文件,我正在执行这个 cli 工作,确保我的 $AWS_SECRET_ACCESS_KEY 和 $AWS_ACCESS_KEY_ID 的环境变量中有正确的东西,并使用 aws configure 手动设置它们.
credentials 包含以下信息,全部空白即:
[sts]
aws_access_key_id = ASIAXXXXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXX
aws_security_token = XXXXXXXXXXXXXXXXXXXXXX
aws_session_expiration = 2018-11-03T00:21:25+0000
aws_session_token = XXXXXXXXXXXXXXXXXXXXXXX
[default]
aws_access_key_id = ASIAXXXXXXXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXXXXXXX
还只是为了确保我已完成所有设置,我还运行了aws configure:
(venv) ~/.aws $ aws configure list
Name Value Type Location
---- ----- ---- --------
profile <not set> None None
access_key ****************XXXX shared-credentials-file
secret_key ****************XXXX shared-credentials-file
region
us-east-1 config-file ~/.aws/config
但是,当我运行以下命令时,它说我有这个错误:
(venv) ~/.aws $ aws s3 sync s3://mybucket/my/path ~/my/path
fatal error: An error occurred (InvalidAccessKeyId) when calling the ListObjectsV2 operation: The AWS Access Key Id you provided does not exist in our records.
我不知道如何解决这个问题,并且用尽了我所有的谷歌搜索选项。
【问题讨论】:
标签: amazon-web-services amazon-s3 aws-cli