我们的记录中不存在AWS Access Key ID [英] The AWS Access Key Id does not exist in our records
问题描述
我创建了一个新的访问密钥,并在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 Access Key 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 Access Key ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!