Skip to content
Latchkey

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: dist

Notes

  • 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

Run this faster and cheaper on Latchkey managed runners. Start free →