I have installed the AWS Command line tools and have also set the Env Variables, but why I type mon-cmd I am getting this error, I am not able to figure it out,kindly help me.

/usr/local/aws/bin/mon-cmd: line 12: /home/ubuntu/usr/local/aws/bin/service: No such file or directory
/usr/local/aws/bin/mon-cmd: line 12: exec: /home/ubuntu/usr/local/aws/bin/service: cannot execute: No such file or directory
link|improve this question

Do you have a user called ubuntu? – Bart De Vos Jan 25 at 12:09
Can you post the output of ls -l /home/ubuntu/usr/local/aws/bin/service? – Khaled Jan 25 at 12:09
@Khaled ls: cannot access /home/ubuntu/usr/local/aws/bin/service: No such file or directory – Jeevan Dongre Jan 27 at 4:54
feedback

2 Answers

up vote 1 down vote accepted

It looks like the mon-cmd is looking for the binaries path in /home/ubuntu instead of /.

Can you show how you set the EC2_HOME environmental variable? You an run something like env |grep EC2.

I have mine set like:

export EC2_HOME=~/ec2

I suspect you have it set similarly, but you probably want it set to / (i.e., export EC2_HOME=/) or something similar.

You may need to add /usr/local/aws/bin to your PATH, additionally.

link|improve this answer
I have set the EC2 home path as /usr/local/aws by export EC2_PATH=/usr/local/aws – Jeevan Dongre Jan 27 at 4:56
feedback

It's not EC2_PATH. Do this:

$ export EC2_HOME=/usr/local/aws
$ export PATH=$PATH:$EC2_HOME/bin

Then, with your private key and certificate:

$ export EC2_PRIVATE_KEY=~/.ec2/pk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.pem 
$ export EC2_CERT=~/.ec2/cert-YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY.pem

Change X and Y for your respectives.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.