0

I added new user and configured credentials

aws configure import --csv file://new_user_credentials.csv

I edited manually config and credentials files by removing previous accounts

aws configure list-profiles

shows

default
mapichanach

Well,it does not work

 echo $AWS_ACCESS_KEY_ID
AKIAYMYFMTQMoriginal
cat .aws/credentials 
[default]
aws_access_key_id = AKIAYMYFMTQMdifferent
aws_secret_access_key = *********************
[markovich]
aws_access_key_id = AKIAYMYFMTQMdifferent
aws_secret_access_key = *********************

when I tried

aws s3 ls --region us-east-1

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

I changed .bash_aws hidden file. Now both $AWS_ACCESS_KEY_ID and $AWS_SECRET_ACCESS_KEY show the same value as in credential file.

So I am confused right now. Why the change is not detected?

Richard Rublev
  • 7,718
  • 16
  • 77
  • 121
  • 3
    Maybe this can help you https://stackoverflow.com/questions/39051477/the-aws-access-key-id-does-not-exist-in-our-records – Youcef LAIDANI Nov 07 '22 at 10:11
  • @YoucefLaidani I changed .bash_aws,got again the same error. – Richard Rublev Nov 07 '22 at 10:26
  • 1
    It is unusual to mix Environment Variables and stored credentials. You should remove anything that is setting the Environment Variables and just rely on the information in the `~/.aws/credentials` file. – John Rotenstein Nov 07 '22 at 10:37
  • @JohnRotenstein I deleted .bash_aws,I still have the same problem. – Richard Rublev Nov 07 '22 at 10:44
  • 2
    Well, _something_ is setting those Environment variables. You'll need to figure out what it is. You could [`unset`](https://devconnected.com/how-to-set-and-unset-environment-variables-on-linux/) the variable, but it might come back later. – John Rotenstein Nov 07 '22 at 10:52

0 Answers0