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

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.

  • I have set the EC2 home path as /usr/local/aws by export EC2_PATH=/usr/local/aws – Jeevan Dongre Jan 27 '12 at 4:56

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:


Change X and Y for your respectives.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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