Install aws-cli on macOS
Based on: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-mac.html
$ cd /tmp
$ curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
$ sudo installer -pkg ./AWSCLIV2.pkg -target /
Configure default profile
- AWS Access Key ID
- AWS Secret Access Key
- Default region name
- Default output format
$ aws configure
Configure a specific profile
$ aws configure --profile my_profile_name
List default profile information
$ aws configure list
List all profile names
$ aws configure list-profiles
Get Access Key ID
$ aws configure get aws_access_key_id --profile default
List all profiles credentials
$ cat ~/.aws/credentials
Changing default profile
$ export AWS_DEFAULT_PROFILE=my_profile_name
https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/aws-cli/bash-linux