How do I clear the credentials in aws configure?
I have deleted the credentials in sudo nano ~/.aws/config but the credentials are still in aws configure. Is there a way to reset aws configure with clear state?
just remove ~/.aws/credentials along with ~/.aws/config
EDIT: Note path references user home directory and specific to each user in system.
Do not delete the files if you have multiple profiles created as all will be lost if you delete these files! unless thats what you want :)
Go to each of the file -
- ~/.aws/credentials - ~/.aws/config
and remove just the part profiles you want to delete. Eg.
[default] aws_access_key_id=yourAccessKeyId aws_secret_access_key=yourSecretAccessKey [user2] aws_access_key_id=yourAccessKeyId aws_secret_access_key=yourSecretAccessKey
[default] region=us-west-2 output=json [profile user2] region=us-east-1 output=text
Just delete entries corresponding to user2 profile if thats what you want. And you should also give a profile name to profile you configure -
aws configure --profile user2
Else it will just be [default]