Skip to main content
Jamf Nation, hosted by Jamf, is the largest Apple IT management community in the world. Dialog with your fellow IT professionals, gain insight about Apple device deployments, share best practices and bounce ideas off each other. Join the conversation.

Install AWS CLI through Jamf

Hi, I'm looking to make a policy that will install AWS CLI, and have been running into a few problems. I originally tried via pip, but ran into permissions issues during the execution.

I then tried via brew, however I am running into a roadblock there. Currently, I am able to successfully get brew installed via a script I found here. I then created another policy with the command 'brew install awsci', configured under files and processors-> execute comand, but get the response 'brew not found'.

I accounted this to the command being run as root instead of the user, so I then tried to create a script (attached below) that would run as the current user. Unfortunately, it returned with: 'Script result: bash: brew: command not found'

I am able to manually enter the command 'brew install awscli' from the logged in user via terminal, so I know that works...any thoughts on how to get this working completely via jamf?

Thanks in advance

Like Comment
SOLVED Posted: 9/13/17 at 1:13 PM by Asnyder

You might want to setup an if/then to make sure homebrew is installed and if not then install it and then install awscli. There could be something else causing it to throw that error but I would double check all endpoints have it installed. If you know it's installed try adding the path to the command. I think it would look like "/usr/local/bin/brew install awscli".

SOLVED Posted: 9/13/17 at 2:16 PM by stevewood

@discounteggroll as @Asnyder pointed out at the end, you probably need to call the full path to the brew binary. You can probably use which or do a find to figure out where the brew binary is located and then use that path in your script:

which brew


sudo find / -name "brew" -print

SOLVED Posted: 9/14/17 at 3:33 PM by discounteggroll

Thanks you two, I modified the script to add the path, and it now works as expected.

SOLVED Posted: 9/16/17 at 2:02 AM by bentoms

There's also some AutoPkg recipes for this title, with some EA's that might help: