我们的记录中不存在 AWS 访问密钥 ID [英] The AWS Access Key Id does not exist in our records

查看:45
本文介绍了我们的记录中不存在 AWS 访问密钥 ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个新的访问密钥,并在 AWS CLI 中使用 aws configure 对其进行了配置.它在 ~/.aws/config 中创建了 .ini 文件.当我运行 aws s3 ls 它给出:

I created a new Access Key and configured that in the AWS CLI with aws configure. It created the .ini file in ~/.aws/config. When I run aws s3 ls it gives:

调用 ListBuckets 操作时发生客户端错误 (InvalidAccessKeyId):我们的记录中不存在您提供的 AWS 访问密钥 ID.

A client error (InvalidAccessKeyId) occurred when calling the ListBuckets operation: The AWS Access Key Id you provided does not exist in our records.

AmazonS3FullAccess 策略也附加到用户.如何解决这个问题?

AmazonS3FullAccess policy is also attached to the user. How to fix this?

推荐答案

您可能会发生通过 env 变量 (bash_profile) 导出的旧密钥,并且由于 env 变量比凭据文件具有更高的优先级,因此会出现错误访问密钥 ID 不存在".

It might be happening that you have the old keys exported via env variables (bash_profile) and since the env variables have higher precedence over credential files it is giving the error "the access key id does not exists".

从 bash_profile 中删除旧密钥,您就可以开始了.

Remove the old keys from the bash_profile and you would be good to go.

之前发生过一次,当时我忘记了 bash_profile 中的凭据,这让我很头疼:)

Happened with me once earlier when I forgot I have credentials in bash_profile and gave me headache for quite some time :)

这篇关于我们的记录中不存在 AWS 访问密钥 ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆