-
Notifications
You must be signed in to change notification settings - Fork 786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws command not found #82
Comments
Check whether you're using bash or the default #!/bin/sh for the script.
...assuming the aws binary lives in /usr/local/bin. |
Thanks for the fast reply, I've tried your solution, in my case awscli lives here Added this to the script but didn't work #!/bin/bash
PATH="/home/ubuntu/.local/bin:$PATH" It throws these errors Traceback (most recent call last):
[2018-07-04 22:27:07.602] [d-CK8PAP73U][stderr] File "/home/ubuntu/.local/bin/aws", line 19, in <module>
[2018-07-04 22:27:07.602] [d-CK8PAP73U][stderr] import awscli.clidriver
[2018-07-04 22:27:07.602] [d-CK8PAP73U][stderr]ImportError: No module named awscli.clidriver I installed the awscli with pip. |
np, we've all been there. I'm guessing you're using some virtual env wrapper for your python installation given the ~/.local/bin PATH. Or, from an interactive shell, where the aws command works, loo at the env output and see what you're missing. |
Yeah, you're right. I have this This is the path on the script
And this is the path on the terminal
But adding the PATH manually doesn't seem to work. Already tried that with |
It's not PATH, it's the python virtualenv setup. |
Install AWS CLi version 2. Export the path of aws |
Hi everyone,
I'm having a problem with my scripts, one of the uses the aws command to retrieve variables stored on SSM, something like this
aws ssm get-parameters-by-path \ --path "/keys" \ --with-decryption \ --query "Parameters[*].[Name,Value]" \ --output text
I have aws cli installed on my EC2 Ubuntu instance, and the script works just fine if run from the terminal, but not from codedeploy scripts.
What would be the correct approach to accomplish this?
Thanks
The text was updated successfully, but these errors were encountered: