I am trying to setup up Amazon's EC2 service and am having some trouble.
I have downloaded the Amazon EC2 API Tools, which I've put in a folder ~/.ec2
along with my .cert
and .pem
files.
When I attempt any command from ~/.ec2/bin
I get an error /Users/zmjones/.ec2/bin/ec2-cmd: /usr/bin/env: bad interpreter: Operation not permitted
. I asked about this in "/usr/bin/env bad interpreter".
Now that I have removed the DOS line-endings using variants of this mv /users/zmjones/.ec2/bin/ec2-add-keypair /users/zmjones/.ec2/bin/ec2-add-keypair.bak
tr -d '\r' < /users/zmjones/.ec2/bin/ec2-add-keypair.bak > /users/zmjones/.ec2/bin/ec2-add-keypair
, I've tried to execute some of the commands in ~/.ec2/bin
and have been unable to get it to work.
I've gotten a permission denied error, which when I then use sudo, tells me that the environment variable EC2_HOME
doesn't exist, while echo $EC2_HOME
indicates that it does. Here is my ~/.bash_profile
.
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin:$PATH
PATH=/opt/local/sbin:/usr/local/bin:/usr/x11/bin:/usr/texbin:$PATH
PATH=/usr/local/texlive/2011/bin/x86_64-darwin:$PATH
PATH=/Library/Frameworks/EPD64.framework/Versions/Current/bin:$PATH
EC2_HOME=~/.ec2
PATH=$EC2_HOME/bin:$PATH
EC2_PRIVATE_KEY=`ls $EC2_HOME/pk-*.pem`
EC2_CERT=`ls $EC2_HOME/cert-*.pem`
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home/
export PATH