How do I clear the credentials in aws configure?

I have deleted the 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?

Answers


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


Need Your Help

How can Boost be used to achieve C++14-style auto return types?

c++ c++11 boost

Suppose I have a function that adds two values together. If I know nothing about the types then I basically have to write my function twice; once in the actual return value and again as the return ...

How to call an ASP.NET WebMethod in a UserControl (.ascx)

c# jquery asp.net webmethod ascx

Is it possible to place a WebMethod in an ascx.cs file (for a UserControl) and then call it from client-side jQuery code?