Atriso
Solving problems using cloud computing...
  • Home

Setting EC2 Environment Variables in ~/.bash_login

By Ringo on 25 Sep 2008 No Comments

Section “Setting up the Tools” of the Amazon EC2 Getting Started Guide explains how to set up environment variables, so that the EC2 tools find themselves (EC2_HOME), Java ($JAVA_HOME), the private access key file (EC2_PRVATE_KEY) and the certificate file (EC2_CERT). And they also suggest to change the PATH variable, so that you can run EC2 commands from anywhere.

Of course, you do not want to set the environment variables every time you want to use the EC2 tools. I added the lines below to ~/.bash_login on my Mac, so that the environment variables are set everytime I open a terminal. I installed the tools in ~/AWS/ec2-api-tools-1.3-24159 and the private access key file and the certificate file reside in ~/.ec2.

export EC2_PRIVATE_KEY=~/.ec2/pk-<some id here>.pem
export EC2_CERT=~/.ec2/cert-<some id here>.pem
export EC2_HOME=~/AWS/ec2-api-tools-1.3-24159
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
export PATH=$PATH:$EC2_HOME/bin
Categories : Amazon Web Services
Tags : Amazon Web Services, EC2

Leave a Reply

Click here to cancel reply.

Categories

  • Amazon Web Services (4)
  • Security (1)
Atriso
Copyright © 2012 All Rights Reserved
iThemes Builder by iThemes
Powered by WordPress