Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,359,774
Community Members
 
Community Events
168
Community Groups

Pipelines - aws: command not found

Edited

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?

2 answers

1 accepted

2 votes
Answer accepted
edwin Rising Star Feb 28, 2019

Hi @Augusto Cordero ,

Install awscli from apt

- apt-get update && apt-get install -y awscli
- aws --version

Thanks, it works for me.

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 Rising Star 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

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

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

edwin Rising Star May 16, 2019

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

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.

I did end up building my own image `aaronsteers/builder:python3.7-aws`. I've setup automated build and made the image public on dockerhub.com:

Like ktomk likes this

Atlassian also has an alpine image for the awscli: https://hub.docker.com/r/atlassian/pipelines-awscli

Like edwin likes this
Aruna I'm New Here Aug 17, 2022

Thank you... after 16hrs i found this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

3,448 views 3 10
Read article

Atlassian Community Events