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 réponse
1
Réponse acceptée

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
EXPERT
répondu il y a 6 mois
profile picture
EXPERT
vérifié il y a 6 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions