Getting 500 error when trying to deploy changes to AWS ElasticBeanStalk via Bitbucket Pipelines
Asked by Vedavyas Chigurupati:

**Error:**   

rpc error: code = Unknown desc = failed to pull and unpack image "docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-auth-proxy:prod-stable": failed to resolve reference "docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-auth-proxy:prod-stable": pulling from host docker-public.packages.atlassian.com failed with status code \[manifests prod-stable\]: 500 Internal Server Error  

<br />

**Pipeline Config:**   

image: python:3.8

pipelines:  
default:  
- parallel:  
- step:  
name: Test  
caches:  
- pip  
script:  
- if \[ -f requirements.txt \]; then pip install -r requirements.txt; fi  
- python manage.py test  
- step:  
name: Lint code  
script:  
# Enforce style consistency across Python projects <https://flake8.pycqa.org/en/latest/manpage.html>  
- pip install flake8  
- flake8 . --extend-exclude=dist,build --show-source --statistics

branches:  
develop:  
- step:  
name: 'Build and Upload'  
script:  
- echo "Building application"  
- apt-get update  
- apt-get install zip  
- zip -r application.zip .  
- pipe: atlassian/aws-elasticbeanstalk-deploy:1.0.1  
variables:  
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID  
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY  
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION  
APPLICATION_NAME: $AWS_APPICATION_NAME  
COMMAND: 'upload-only'  
ZIP_FILE: 'application.zip'  
S3_BUCKET: $AWS_EB_DEPLOYMENT_BUCKET  
VERSION_LABEL: '$AWS_APPICATION_NAME-$BITBUCKET_BUILD_NUMBER-$AWS_DEVELOPMENT_ENV'  
- step:  
name: 'Deployment to development'  
deployment: test  
script:  
- echo "Deploying to development environment"  
- pipe: atlassian/aws-elasticbeanstalk-deploy:1.0.1  
variables:  
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID  
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY  
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION  
APPLICATION_NAME: $AWS_APPICATION_NAME  
ENVIRONMENT_NAME: $AWS_DEVELOPMENT_ENV  
COMMAND: 'deploy-only'  
VERSION_LABEL: '$AWS_APPICATION_NAME-$BITBUCKET_BUILD_NUMBER-$AWS_DEVELOPMENT_ENV'  
WAIT: 'true'

staging:  
- step:  
name: 'Build and Upload'  
script:  
- echo "Building application"  
- apt-get update  
- apt-get install zip  
- zip -r application.zip .  
- pipe: atlassian/aws-elasticbeanstalk-deploy:1.0.1  
variables:  
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID  
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY  
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION  
APPLICATION_NAME: $AWS_APPICATION_NAME  
COMMAND: 'upload-only'  
ZIP_FILE: 'application.zip'  
S3_BUCKET: $AWS_EB_DEPLOYMENT_BUCKET  
VERSION_LABEL: '$AWS_APPICATION_NAME-$BITBUCKET_BUILD_NUMBER-$AWS_STAGING_ENV'  
- step:  
name: 'Deployment to staging'  
deployment: staging  
script:  
- echo "Deploying to staging environment"  
- pipe: atlassian/aws-elasticbeanstalk-deploy:1.0.1  
variables:  
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID  
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY  
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION  
APPLICATION_NAME: $AWS_APPICATION_NAME  
ENVIRONMENT_NAME: $AWS_STAGING_ENV  
COMMAND: 'deploy-only'  
VERSION_LABEL: '$AWS_APPICATION_NAME-$BITBUCKET_BUILD_NUMBER-$AWS_STAGING_ENV'  
WAIT: 'true'  
master:  
- step:  
name: 'Build and Upload'  
script:  
- echo "Building application"  
- apt-get update  
- apt-get install zip  
- zip -r application.zip .  
- pipe: atlassian/aws-elasticbeanstalk-deploy:1.0.1  
variables:  
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID  
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY  
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION  
APPLICATION_NAME: $AWS_APPICATION_NAME  
COMMAND: 'upload-only'  
ZIP_FILE: 'application.zip'  
S3_BUCKET: $AWS_EB_DEPLOYMENT_BUCKET  
VERSION_LABEL: '$AWS_APPICATION_NAME-$BITBUCKET_BUILD_NUMBER-$AWS_PRODUCTION_ENV'  
- step:  
name: 'Deployment to production'  
deployment: production  
script:  
- echo "Deploying to production environment"  
- pipe: atlassian/aws-elasticbeanstalk-deploy:1.0.1  
variables:  
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID  
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY  
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION  
APPLICATION_NAME: $AWS_APPICATION_NAME  
ENVIRONMENT_NAME: $AWS_PRODUCTION_ENV  
COMMAND: 'deploy-only'  
VERSION_LABEL: '$AWS_APPICATION_NAME-$BITBUCKET_BUILD_NUMBER-$AWS_PRODUCTION_ENV'  
WAIT: 'true'


Answers:
author: Syahrul
body: Hello,

On July 6, 2023, Atlassian cloud Products experienced intermittent outages and performance regressions caused by an underlying infrastructure change to our internal container registry.

This issue affected Bitbucket pipelines as they depend on images that were inaccessible during the outage and caused some pipeline builds to fail. We suggest you run a new pipeline instead of re-running failed builds to pick up the new changes.

We apologise for this inconvenience and will share more in our post incident review in the original [incident report](https://bitbucket.status.atlassian.com/incidents/vhr4kf5rqz71). Please let us know if you need help or have other questions about this incident.

Regards,  
Syahrul


author: Aron Gombas _Midori_
body: Probably you were experiencing this incident which is resolved by now:

<https://bitbucket.status.atlassian.com/incidents/vhr4kf5rqz71>


Tags: bitbucket-cloud

bitbucket-pipelines

cloud