AWS CLI Command to remove configured aws credentials (access_key and secret_access_key)

0

I configured the aws credentials in the codebase using command aws config however now I want to remove those credentials and the update the new one but I am unable to remove using the below commands: aws configure unset aws_access_key_id aws configure unset aws_secret_access_key aws configure unset region

Please help me how to achieve this

1 Antwort
1
Akzeptierte Antwort

Hello.

If you run "aws configure" again and enter a new access key etc., it should be overwritten.

aws configure

AWS Access Key ID [*****Z2UD]: *****
AWS Secret Access Key [*****NBuv]: *****
Default region name [ap-northeast-1]: ap-northeast-1
Default output format [json]: json

Alternatively, I think it can be resolved by deleting or rewriting the contents of "~/.aws/credentials" and "~/.aws/config" as described in the StackOverFlow below.
https://stackoverflow.com/questions/46319880/how-do-i-clear-the-credentials-in-aws-configure

profile picture
EXPERTE
beantwortet vor 6 Monaten
profile picture
EXPERTE
überprüft vor 6 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen