Skip to content

Bucket

A Bucket represents an object storage container for files and data. On AWS this is S3, on GCP Cloud Storage, on Hetzner S3-compatible storage, and on DigitalOcean Spaces. All providers support standard object storage operations.

Property Type Required Description
name string yes Unique resource name (globally unique for S3/Spaces)
id string no Explicit ID (auto-generated UUID if omitted)
provider string no Provider label for multi-provider configs
tags Record<string, string> no Arbitrary key-value metadata
region string no Region for the bucket (defaults to provider region)
public boolean no Allow public access (default false)
versioning boolean no Enable object versioning (default false)
import { Bucket } from '@kykucloud/types'
const assets = new Bucket({
name: 'my-assets',
region: 'eu-central',
public: true,
versioning: true,
})
Provider Supported Backend
AWS S3
GCP Cloud Storage
Hetzner S3-compatible (via @aws-sdk/client-s3 with endpoint override)
DigitalOcean Spaces (via @aws-sdk/client-s3 with endpoint override)
  • Hetzner S3 uses @aws-sdk/client-s3 with endpoint override and AWS SigV4 auth. Credentials via HETZNER_S3_REGION, HETZNER_S3_ACCESS_KEY, HETZNER_S3_SECRET_KEY.
  • DigitalOcean Spaces uses @aws-sdk/client-s3 with Spaces endpoint override and AWS SigV4 auth. Credentials via DO_SPACES_REGION, DO_SPACES_ACCESS_KEY, DO_SPACES_SECRET_KEY.
  • Bucket names must be globally unique across all customers for AWS S3 and DO Spaces. GCP bucket names are also globally unique across all projects.
  • Public access: Setting public: true enables anonymous read access. AWS blocks public access by default — this setting overrides the account-level block.
  • Versioning: Enables object versioning for data protection. Cannot be disabled once enabled on some providers without recreating the bucket.