I seem to be having difficulty deleting the access key profile i created for a test user using
aws configure --profile testuser
I have tried deleting the entries in my ~/.aws
directory however when i run aws configure
, i am getting the following error.
botocore.exceptions.ProfileNotFound: The config profile (testuser) could not be found
A workaround is adding [profile testuser]
in my ~/.aws/config
file but i dont want to do that. I want to remove all traces of this testuser profile from my machine.
The Configuring the AWS Command Line Interface documentation page lists various places where configuration files are stored, such as:
- Linux:
~/.aws/credentials
- Windows:
C:\Users\USERNAME \.aws\credentials
There is also a default profile, which sounds like something that might be causing your situation:
- Linux:
export AWS_DEFAULT_PROFILE=user2
- Windows:
set AWS_DEFAULT_PROFILE=user2
I suggest checking to see whether that environment variable has been set.
来源:https://stackoverflow.com/questions/40098377/aws-configure-delete-access-key-profile