(在我的测试框中,如果在没有凭据文件的情况下运行 aws命令,错误是 Unable to locate credentials. You can configure credentials by running "aws configure".)
您可以尝试从尝试运行 aws的同一个 shell 中运行这两个命令吗:
when I ran make awssetup I got the error: fatal error: An error occurred (InvalidAccessKeyId) when calling the ListObjects operation: The AWS Access Key Id you provided does not exist in our records.. but running it from the command line worked.
我尝试了以下步骤,结果奏效了:
1. cd ~
2. cd .aws
3. vi credentials
4. delete
Aws _ access _ key _ id =
Aws _ secret _ access _ key =
by placing cursor on that line and pressing dd (vi command to delete line).
对于那些运行 aws s3 ls并获得此异常的用户。确保您对所提供的 AWS 帐户下的所有区域都有权限。当运行 aws s3 ls时,您尝试在 AWS 帐户下拉出所有的 s3存储桶。因此,如果您没有对所有区域的权限,您将得到这个异常 -An error occurred (InvalidAccessKeyId) when calling the ListBuckets operation: The AWS Access Key Id you provided does not exist in our records.
And then tried to perform another action (aws s3 cp in particular) with this credentials without session token (only AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY without AWS_SESSION_TOKEN).
这会导致 AWS CLI: An error occurred (InvalidAccessKeyId) when calling the PutObject operation: The AWS Access Key Id you provided does not exist in our records.出现相同的错误