Issue while recreating AWS authentication profile in Terraform

Viewed 94

Followed below mentioned step for creating the sso profile in AWS using command prompt and leverage it to create S3 bucket:

Steps to Setup Profile:

In PowerShell ran: aws configure sso

sso_start_url = url

sso_region = us-east-1

Note: It will take to browser for login and verification. Once verified, it retrieves the role, After that i have selected the role

  1. CLI default client Region [eu-west-1]: us-east-1
  2. CLI default output format [json]: json
  3. CLI profile name : <<Provide your choice of name>>
  4. This will create .aws folder and config file under your home directory (under \User\\<<username>>)

Steps to use profile:

  1. Ran below command to set profile in PowerShell setx AWS_PROFILE <<profile name>> and configure the access key and secret key using command aws configure

  2. After setting profile in current PowerShell session, trying to create the S3 bucket, but unable to create it.

  3. Got error like

    No valid credentials for AWS provider

Profile recreation steps:

  1. To recreate profile I have deleted the .aws folder which was created in the home directory path (under \User\\<<username>>\\.aws)

  2. Now, while trying to create new profile using aws configure sso command, it is showing error like

    The config profile (profile name) could not be found

0 Answers
Related