Amazon S3 storage

This page provides details on how to link your own Amazon Web Services (AWS) Simple Storage Service (S3) bucket (or simply Amazon S3 bucket) to Buildkite Package Registries, through a private storage link.

By default, Buildkite Package Registries provides its own storage (known as Buildkite storage). However, linking your own Amazon S3 bucket to Package Registries lets you:

  • Keep packages and artifacts close to your geographical region for faster downloads.
  • Retain full sovereignty over your packages and artifacts, while Buildkite continues to manage their metadata and indexing.

Buildkite Package Registries uses AWS CloudFormation to provision its services within your private Amazon S3 storage.

Before you start

Before you can start linking your private Amazon S3 storage to Buildkite Package Registries, you will need to have created your own empty Amazon S3 bucket.

Learn more about:

Deleting packages

When deleting a package, Buildkite Package Registries does not delete the associated objects from your storage. Instead, Package Registries marks them for deletion using Amazon S3 object tags. Learn more about these object tags in Amazon's Categorizing your storage using tags documentation.

An object tagged for deletion by Package Registries has the following key value pair:

Key Value
buildkite:deleted Timestamp in UTC

Set the expiration on objects from your Amazon S3 bucket by adding an S3 Lifecycle configuration that filters on these object tags. For example, to remove objects 30 days after they're tagged, you can implement the following rule:

{
  "Rules": [
    {
      "ID": "BuildkiteDeleteExpired",
      "Status": "Enabled",
      "Filter": {
        "Tag": {
          "Key": "buildkite:deleted",
          "Value": "*"
        }
      },
      "Expiration": { "Days": 30 }
    }
  ]
}

Learn more about filter syntax in these lifecycle rules from Amazon's Lifecycle configuration elements > Filter element documentation.