Last active
August 19, 2020 19:42
-
-
Save sjjohansen/2dc889912745e98058d2 to your computer and use it in GitHub Desktop.
Adding AWS CLI in Python Virtualenv on MacOS X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create a directory for you Python Virtual Environments | |
mkdir -p ~/pyenvs | |
# create one for the AWS cli then install the CLI | |
virtualenv ~/pyenvs/aws | |
~/pyenvs/aws/bin/pip install awscli | |
~/pyenvs/aws/bin/pip install boto | |
# run the configuration command. This will prompt you for yur Access Key ID, Secret Access Key and default region | |
# the config files it writes are in ~/.aws | |
~/pyenvs/aws/bin/aws configure | |
# to make life easier, so you don't have to activate the Virtual Env to use it, link the aws command into your ~/bin directory | |
ln -s ~/pyenvs/aws/bin/aws ~/bin/ | |
# running a test command to make sure it works | |
aws iam list-users | |
# profile selection: | |
export AWS_DEFAULT_PROFILE=cbig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment