I created a user in IAM service. and then I entered AWS configure command and entered user access key and secret key and region correctly. but the default account is not changing according to entered details. after that, I deleted .aws/credentials
and aws/config
. Also I reinstalled AWS cli. Without adding any user, still there can be seen default profile with access key, secret key and region.
I entered StackOverflow answer example access keys and secretkeys accidentally using setx
keyword.
How to solve this problem?
When I give aws lambda list-functions
, I get this error:
An error occurred (UnrecognizedClientException) when calling the ListFunctions operation: The security token included in the request is invalid.