Installing AWS command-line tools

From Notes_Wiki
Revision as of 07:07, 5 December 2013 by Saurabh (talk | contribs)

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

Installing AWS 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>