It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Pipelines - aws: command not found Edited

Augusto Cordero Feb 27, 2019

I'm trying to install AWS CLI using pipelines with the following commands :


# Installe and init AWS CLI
- apt-get update && apt-get install -y python-dev
- curl -O https://bootstrap.pypa.io/get-pip.py
- python get-pip.py
- pip install --upgrade --user awscli

Then when I run : 

aws --version

Throws this error  

bash: aws: command not found

 

Any help?

1 answer

1 accepted

1 vote
Answer accepted
Edwin Kyalangalilwa Community Leader Feb 28, 2019

Hi @Augusto Cordero ,

Install awscli from apt

- apt-get update && apt-get install -y awscli
- aws --version
Augusto Cordero Feb 28, 2019

Thanks, it works for me.

Augusto Cordero Feb 28, 2019

It seems that the version installed with this command is not the latest version and cannot handle the aws commands : ecr and ecs, which are what I need.

Edwin Kyalangalilwa Community Leader Feb 28, 2019

I would then recommend using Python 3

- apt-get update && apt-get install -y python3-pip 
- pip3 install -U awscli
- aws --version
Augusto Cordero Feb 28, 2019

Ok, with this version the commands are working properly. Thanks.

AJ Steers I'm New Here Wednesday

Edwin - Do you have another base image for builds you can recommend that already contains the aws CLI?

Edwin Kyalangalilwa Community Leader Thursday

Hi @AJ Steers ,

If all your doing is running awscli commands in the image, then i would recommend a lightweight alpine image .. governmentpaas/awscli - which is based on governmentpaas/curl-ssl

More options - awscli docker hub

Like AJ Steers likes this
AJ Steers I'm New Here Thursday • edited

Thanks very much! I'm also looking for python3.5+ so I might just have to roll my own image to get both. I did a quick search on dockerhub but nothing popped up.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,596 views 1 18
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you