Installing AWS command-line tools

From Notes_Wiki

<yambe:breadcrumb>Amazon_web_services|Amazon web services</yambe:breadcrumb>

Installing EC2 command-line tools

  1. Verify python version is greater than 2.6 with 'python --version'
  2. Install pip using 'sudo yum -y install python-pip'
  3. To install aws-cli use 'sudo pip install awscli'
  4. To upgrade use 'pip install --upgrade awscli'
  5. Create '~/.aws/config' file with following contents:
    [default]
    aws_access_key_id = <key-id>
    aws_secret_access_key = <key>
    region = <region>
  6. If use of environment variables is desired instead of config files then use:
    export AWS_DEFAULT_REGION=<region>
    export AWS_ACCESS_KEY_ID=<key-id>
    export AWS_SECRET_ACCESS_KEY=<key>
  7. If there is need to access more than one AWS account then separate configuration file can be created for each at desired location and then use:
    export AWS_CONFIG_FILE=<config-file>
    to select desired config file

Try 'aws help', 'aws ec2 help', etc. to learn how to use command-line tools.


<yambe:breadcrumb>Amazon_web_services|Amazon web services</yambe:breadcrumb>