Running AWS Command Line Interface using Jenkins: command not found?

Viewed 14366

Here is my infrastructure:

  • M1 is Jenkins master, running OS X (Mountain Lion)
  • M2 is Jenkins slave, running OS X (Mountain Lion)
  • J is a Jenkins job, running on M2

On M2, I have installed AWC CLI using pip, and run aws command manually successfully.

I set up the J job to run that aws command. But when J runs, it fails and the error message is:

... aws: command not found

Do you have any idea this happens and how to fix it?

Thank you.

4 Answers

on your jenkins server 'sudo -i -u jenkins' install aws cli under the jenkins user.

If the solution by Nguyen doesn't work try this path, My Jenkins build [with EnvInject] was setup to install AWS in /home/jenkins/.local/bin/aws

To provide a general working solution you could execute which aws which will provide the exact path of aws binary, or even: $(which aws) which is equivalent to executing aws

Related