Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

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

Suggest an answer

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

Share your use cases: How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features to how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your tea...

34 views 0 1
Join discussion

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