pier_

Buckets

Object storage per environment — private or public, with a CLI data plane and presigned URLs

pier.yaml
environments:
  prod:
    buckets:
      - name: uploads
        access: private          # or public
    apps:
      - name: api
        env:
          UPLOADS_URL: { from: buckets.uploads.url }
          UPLOADS_KEY: { from: buckets.uploads.access_key }
          UPLOADS_SECRET: { from: buckets.uploads.secret_key }
pier ls buckets
output
                         
 NAME    ACCESS  UPDATED 
                         
 uploads private 45s ago 
                         

A bucket holds objects under an HTTPS hostname of its own. private buckets answer only to the bucket's credentials or a presigned URL; public buckets serve every object to anyone with the key. Apps reach a bucket through a link that resolves to an S3-compatible endpoint and credentials.

Configuration

KeyMeaning
accessprivate (default) or public

Links: buckets.<name>.url, .name, .endpoint, .access_key, .secret_key.

Commands

CommandDoes
pier add bucket --name uploads --access private, pier set bucket uploads --access public, pier rm bucket uploadsdeclare, change, remove
pier objects ls --bucket uploadslist objects
pier objects put --bucket uploads ./file.pngupload
pier objects get --bucket uploads file.pngdownload
pier objects presign --bucket uploads file.png --method GETa time-limited URL for a private object
pier objects rm --bucket uploads file.pngdelete an object
pier info uploads, pier monitor uploadshostname, storage and egress

Behaviour

  • Any S3 client works with the link's endpoint and keys (aws s3, the AWS SDKs, mc).
  • Egress through the bucket hostname is metered per bucket (pier monitor uploads).
  • Removing a bucket keeps its objects in trash for 30 days.

Tasks

Set environment variables

On this page