How to Deploy with Pipes in Bitbucket Pipelines
A pipe packages a deploy integration so you configure it with variables instead of writing the deploy script.
Reference a pipe under a step and pass its variables. Pipes exist for S3, CodeDeploy, SSH, and many other targets.
Deploy with the S3 pipe
The pipe handles the upload; you only supply credentials and the target.
bitbucket-pipelines.yml
pipelines:
branches:
main:
- step:
name: Deploy to S3
script:
- pipe: atlassian/aws-s3-deploy:1.6.1
variables:
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_DEFAULT_REGION: us-east-1
S3_BUCKET: my-bucket
LOCAL_PATH: distNotes
- Pipes are versioned Docker images; pin a version like :1.6.1 for reproducibility.
- Store AWS keys as repository or deployment variables, not inline.
- Browse the Bitbucket pipes catalog for ready-made integrations before writing custom shell.
Related guides
How to Run a Parallel Step Set in Bitbucket PipelinesRun multiple Bitbucket Pipelines steps at once with a parallel block, so lint, unit, and build steps execute…
How to Use Deployment Environments in Bitbucket PipelinesTrack releases in Bitbucket Pipelines with deployment environments, tagging a step with deployment so the Dep…