AWS CLI Installation on OSX Mavericks (10.9.x)
Requirements:
- Python 2.6 or higher
Check which version of Python you have installed on your Mac by running:
$ python --version
We’ll need to download and install pip.
$ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py -o get-pip.py
$ sudo python get-pip.py
Once the above is completed, install AWS CLI on your Mac by running:
$ sudo pip install awscliTo upgrade an existent installation, run
$ sudo pip install -U pipWith the CLI installed, we have to configure it
$ aws configure
This will create a file .aws/config in your home folder. The config file will have a [default] entry. When invoking the AWS CLI, the default profile credentials will be used. You can create multiple profiles and pass the profile name to the AWS CLI to use different credentials.
[default]
aws_access_key_id = AKIAIOSFODNN7EXAMPLE
aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
region = us-west-1
[profile user1]
aws_access_key_id = AKASDEWDAFODNN7EXAMPLE
aws_secret_access_key = wJalDRtnFEMI/K7XSDSNG/bPxRfiCYEXAMPLEKEY
region = us-west-2
[profile user2]
aws_access_key_id = ASDEFFEFODNN7EXAMPLE
aws_secret_access_key = wJalrsdTTtnFEMI/K7MSSDG/bPxRfiCYEXAMPLEKEY
region = us-east-1
To list your S3 buckets with default profile, run:
$ aws s3 ls s3://To list a particular S3 buckets with user2 credentials, run:
$ aws s3 ls s3://my_test_bucket/ --profile user2
Don’t forget to check the latest AWS CLI documentation