I have deleted the AWS 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?
Open the IAM console, and then in the navigation pane choose Users or Roles. Choose the user or role that you used to delete the AWS Config rule, expand Permissions boundary, and then choose JSON. In the JSON preview pane, confirm that the IAM policy allows permissions for the DeleteConfigRule API action.
The credentials file is located at ~/. aws/credentials on Linux or macOS, or at C:\Users\ USERNAME \. aws\credentials on Windows. This file can contain the credential details for the default profile and any named profiles.
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.
~/.aws/credentials
[default] aws_access_key_id=yourAccessKeyId aws_secret_access_key=yourSecretAccessKey [user2] aws_access_key_id=yourAccessKeyId aws_secret_access_key=yourSecretAccessKey
and
~/.aws/config
[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]
More details - http://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With