The profiles you see in aws-vault list
correspond to profiles defined in your ~/.aws/config
file. To remove a profile, edit ~/.aws/config
and remove it. E.g., if I see:
$ aws-vault list
Profile Credentials Sessions
======= =========== ========
production production -
testing - -
Then in ~/.aws/config
I will find:
[profile production]
[profile testing]
And if I remove the entry for [profile testing]
, I no longer see it in the output of aws-vault list
:
$ aws-vault list
Profile Credentials Sessions
======= =========== ========
production production -
Here's a complete walkthrough to make sure we're both seeing the same behavior.
I start with an empty credentials list:
$ aws-vault list
Profile Credentials Sessions
======= =========== ========
I add production
credentials:
$ aws-vault add production
Enter Access Key ID: example
Enter Secret Access Key:
Added credentials to profile "production" in vault
Which now appear in the list:
$ aws-vault list
Profile Credentials Sessions
======= =========== ========
production production -
This creates a profile entry in ~/.aws/config
:
$ cat ~/.aws/config
[profile production]
If I remove those credentials:
$ aws-vault remove production
Delete credentials for profile "production"? (y|N) y
Deleted credentials.
The profile still shows up in the list even though the credentials have been deleted:
$ aws-vault list
Profile Credentials Sessions
======= =========== ========
production - -
If I remove the [profile production]
entry from ~/.aws/config
:
$ sed -i '/profile production/d' ~/.aws/config
Then the profile no longer appears in the output of aws-vault list
:
$ aws-vault list
Profile Credentials Sessions
======= =========== ========