Skip to content

Instantly share code, notes, and snippets.

@Twinuma
Last active December 18, 2015 13:39
Show Gist options
  • Save Twinuma/5791159 to your computer and use it in GitHub Desktop.
Save Twinuma/5791159 to your computer and use it in GitHub Desktop.
EC2 API Toolのインストールと環境設定&Python版CLIのインストールと設定まとめ
### Amazon API TOOL DOWNLOAD ###
wget http://ec2-downloads.s3.amazonaws.com/AutoScaling-2011-01-01.zip
wget http://ec2-downloads.s3.amazonaws.com/CloudWatch-2010-08-01.zip
wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip
wget http://ec2-downloads.s3.amazonaws.com/ElasticLoadBalancing.zip
wget http://awsiammedia.s3.amazonaws.com/public/tools/cli/latest/IAMCli.zip
wget http://s3.amazonaws.com/rds-downloads/RDSCli.zip
wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip
### Amazon API TOOL DOWNLOAD ###
### COFING BASHRC ###
echo 'export JAVA_HOME=/etc/alternatives/jre' >> ~/.bashrc
echo 'export EC2_HOME=/home/ec2-user/tools/ec2api' >> ~/.bashrc
echo 'export AWS_AUTO_SCALING_HOME=/home/ec2-user/tools/autoscaling' >> ~/.bashrc
echo 'export AWS_CLOUDWATCH_HOME=/home/ec2-user/tools/cloudwatch' >> ~/.bashrc
echo 'export AWS_ELB_HOME=/home/ec2-user/tools/elb' >> ~/.bashrc
echo 'export AWS_IAM_HOME=/home/ec2-user/tools/iam' >> ~/.bashrc
echo 'export AWS_RDS_HOME=/home/ec2-user/tools/rds' >> ~/.bashrc
echo 'export AWS_S3_HOME=/home/ec2-user/tools/s3' >> ~/.bashrc
echo 'export AWS_ACCESS_KEY=Input Your Access Key' >> ~/.bashrc
echo 'export AWS_SECRET_KEY=Input Your Sercret Key' >> ~/.bashrc
echo 'export EC2_URL=https://ec2.ap-northeast-1.amazonaws.com' >> ~/.bashrc
echo 'export PATH=$PATH:$JAVA_HOME/bin:$EC2_HOME/bin/:$AWS_AUTO_SCALING_HOME/bin/:$AWS_CLOUDWATCH_HOME/bin/:$AWS_ELB_HOME/bin/:$AWS_IAM_HOME/bin/:$AWS_RDS_HOME/bin/:$AWS_S3_HOME/bin' >> ~/.bashrc
source ~/.bashrc
### COFING BASHRC ###
### Amazon Linux CLI INSTALL ###
sudo easy_install pip
sudo pip install awscli
sudo pip install awscli --upgrade
echo 'export AWS_CONFIG_FILE=/home/ec2-user/config_file' >> ~/.bashrc
echo 'complete -C aws_completer aws' >> ~/.bash_profile
aws help
aws ec2 describe-instances
### Amazon Linux CLI INSTALL ###
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment