gpt4 book ai didi

amazon-web-services - "The AWS Access Key Id you provided does not exist in our records."尝试使用 AWS CLI 时

转载 作者:行者123 更新时间:2023-12-04 08:05:30 25 4
gpt4 key购买 nike

我正在尝试通过 cli 访问我的 S3 Bucket。我已经设置好了一切,例如拥有 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.

我不知道如何解决这个问题并且用尽了我所有的谷歌搜索选项。

最佳答案

ASIA 开头的凭据是通过安全 token 服务生成的临时凭证,必须与 token 一起使用。

当您运行 aws s3 sync 时命令,它使用没有 aws_security_token 的 [默认] 凭据定义。

尝试添加 --profile sts命令以使其使用 [sts] 凭据。

关于amazon-web-services - "The AWS Access Key Id you provided does not exist in our records."尝试使用 AWS CLI 时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53127021/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com