Login - davidkhala/aws-collection GitHub Wiki

config file path

  • $env:USERPROFILE\.aws\config on Windows
  • ~/.aws/config on Linux or macOS

credentials file

wizard: aws configure

file path

  • $env:USERPROFILE\.aws\credentials on Windows
  • ~/.aws/credentials on Linux or macOS

SSO

prerequisite:

  • your AWS SSO start URL
    • https://david-khala.awsapps.com/start
  • the AWS Region that hosts the AWS SSO directory
    • ap-east-1
  • Map your SSO user/group towards your aws account
  • aws cli

Workflow

  1. aws configure sso
    
  2. SSO session name (Recommended): desktop
    SSO start URL [None]: https://david-khala.awsapps.com/start
    SSO Region [None]: ap-east-1
    SSO registration scopes [sso:account:access]:
    
  3. login to your aws SSO account in web browser
  4.  CLI default client Region [None]: ap-east-1
     CLI default output format [None]:
     CLI profile name [AdministratorAccess-606262941110]: default
    
  5. Done, you can validate by
    aws s3 ls --profile default
    
    Or
    aws sts get-caller-identity
    

If session timeout, refresh by aws sso login