Amazon EC2 CLI Installation

From NovaOrdis Knowledge Base
Revision as of 23:11, 9 April 2019 by Ovidiu (talk | contribs) (→‎Set the Region)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

External

Internal

Download

wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip

Unzip

cd /opt
unzip .../ec2-api-tools.zip
ln -s ./ec2-api-tools-1.7.5.1 ec2-api-tools

Adjust the command to reflect the actual EC2 API tools version.

Post-Install

Set JAVA_HOME

Set JAVA_HOME for all accounts that are going to use ec2 tools.

Set Environment

For all users that are going to use it, configure the following environment variables in their .bashrc (or equivalent):

export EC2_HOME=/opt/ec2-api-tools
export PATH=${PATH}:${EC2_HOME}/bin

Set AWS Credentials

Setting AWS Credentials

Test Installation

ec2-describe-regions

Set the Region

Set AWS Region