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,293,857
Community Members
 
Community Events
165
Community Groups

bitbucket pipeline AWS docker image atlassian/pipelines-awscli - python version outdated

Hi,

I'm having an issue since July 15h using the image atlassian/pipelines-awscli. With the end of support to Python 2.7 this image no longer works for me.

Image:
https://hub.docker.com/r/atlassian/pipelines-awscli

AWS announcement:
https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-python-2-7-in-aws-sdk-for-python-and-aws-cli-v1/

Error:
./awscli-bundle/install -b ~/bin/aws
Unsupported Python version detected: Python 2.7
To continue using this installer you must use Python 3.6 or later.
For more information see the following blog post:
https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-python-2-7-in-aws-sdk-for-python-and-aws-cli-v1/



Is anyone else having the same issue? Any quick workaround?

1 answer

Hi,

I had same issue, I replaced the docker image and it got fixed.
- image: circleci/python:rc-node-browsers-legacy

Hi,

I end up finding another way. Actually, the issue was not on the docker image I mention, this is the image with problems:

atlassian/default-image:2

So I end up adding this to the bitbucket-pipelines.yml

- add-apt-repository ppa:deadsnakes/ppa
- apt update
- apt install -y python3.9 python3.9-dev python3.9-venv
- update-alternatives --install /usr/bin/python python /usr/bin/python3.9 10

 Full step:

name: Deploy to ECS
image: atlassian/default-image:2
deployment: Development
script:
- add-apt-repository ppa:deadsnakes/ppa
- apt update
- apt install -y python3.9 python3.9-dev python3.9-venv
- update-alternatives --install /usr/bin/python python /usr/bin/python3.9 10
- apt-get install -y jq
- curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
- unzip awscli-bundle.zip
- ./awscli-bundle/install -b ~/bin/aws
- export PATH=~/bin:$PATH
- export IMAGE_NAME=${AWS_REGISTRY_URL}/${BITBUCKET_BUILD_NUMBER}
- envsubst < $FILENAME > $FILENAME
- pipe: atlassian/aws-ecs-deploy:1.0.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
CLUSTER_NAME: $AWS_ECS_CLUSTER
SERVICE_NAME: $AWS_ECS_SERVICE
TASK_DEFINITION: $FILENAME
Like Tushar Ughade likes this

This is a good solution, thank you. Just wonder how did you resolve those <none> images. They are generated every time restart the task, some image could be large, so if people pushed too often, your server could run out of disk spaces.

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...

2,130 views 2 9
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