A lot of this probably works just fine under Linux, too.

A bunch of the tools require java, which can be downloaded from Apple, and you’ll want to set your environment’s JAVA_HOME variable (in ~/.bash_profile, unless it’s .bash_login or .bashrc).

export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home

Then you’ll need to log into AWS console, and download your access and secret keys. While you’re there, download the EC2 CLI tools.

I install them into a custom directory. I like /opt, but your mileage may vary. You’ll have to change all the path declarations below, though.

Add the following lines to ~/.bash_profile (as above for Java)

export EC2_HOME=
PATH=$PATH:$EC2_HOME/bin
export AWS_ACCESS_KEY=""
export AWS_SECRET_KEY=""

Next, download and install Amazon’s Elastic Load Balancer CLI Tools, and configure them by adding a couple lines to your ~/.bash_profile.

export AWS_ELB_HOME=/opt/aws/elb
PATH=$PATH:$AWS_ELB_HOME/bin

Then download Amazon’s Elastic Beanstalk CLI Tools, which require Ruby 1.8.7 or greater, and Python 2.7 or 3.0 (both of which are pre-installed on Mountain Lion).

You will need to create an AWS Credentials File. I’m not sure what changed, and why these tools don’t use BASH environment variables, but I use ~/.aws_credentials. You’ll also need to do this if you use the RDS CLI tools.

AWSAccessKeyId=
AWSSecretKey=

And then you need to create a BASH environment variable pointing to the newly created file. Put this in ~/.bash_profile.

export AWS_CREDENTIAL_FILE=$HOME/.aws_credentials
export AWS_EB_HOME=/opt/aws/eb
PATH=$PATH:$AWS_EB_HOME/api/bin:$AWS_EB_HOME/eb/linux/python2.7

If you want to use a different default region (instead of us-east), you’ll need to add this line to your BASH profile.

export ELASTICBEANSTALK_URL="https://elasticbeanstalk.us-east-1.amazonaws.com

To install Amazon’s Relational Database Service CLI Tools, you will need to be sure to include the credentials file created above, and the BASH line to point to it. You will then simply need to add a couple more lines to ~/.bash_profile.

export AWS_RDS_HOME=/opt/aws/rds
PATH=$PATH:$AWS_RDS_HOME/bin

That’s it. Your AWS environment is set up.

Back to work.