AWS – All about setup

Create profile

  • Run command line
aws configure --profile profile-name
  • Open config file
cd ~/.aws/config
  • Profile is configured as below
[profile profile-name]
region = ap-southeast-2
output = json
  • See profile detail
aws configure list --profile profile-name

Add private key

  • If you do not have one, create a file ~/.aws/credentials
[a-profile-name]
aws_access_key_id=AAAAAAAAAAAAAAAAAAAA
aws_secret_access_key=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
region=us-east-1
  • Get a token and put it into Mac environment variables
export MY_AUTH_TOKEN=`aws codeartifact get-authorization-token --domain {{a-domain-name}} --domain-owner {{123456789012}} --query authorizationToken --output text --profile {{a-profile-name}}`
  • Check your token value
echo $MY_AUTH_TOKEN
  • You can now log in by username and password (above token)

Be the first to comment

Leave a Reply

Your email address will not be published.


*