DigitalOcean Spaces

Implementation, training & consulting · 35 guides

Get help with DigitalOcean Spaces
Quick answer: Consultants in a Box helps teams implement, train on, and get more value from DigitalOcean Spaces, and connect it with AI and the rest of their software stack. Book a free consultation.

About DigitalOcean Spaces

Input and Storage Architecture

DigitalOcean Spaces is an object storage service designed to store a wide range of unstructured data including:

  • Media assets
  • Backups
  • Static content

In a typical deployment, client applications authenticate with access keys and secrets, request a bucket scoped namespace, and perform operations through a RESTful API compatible interface. The underlying storage is organized into buckets that act as logical containers, with each bucket capable of hosting a lifecycle of objects.

Objects themselves are immutable blobs that can be versioned or configured with retention rules to support data governance, compliance, and disaster recovery. Spaces emphasizes high durability and scalable throughput, enabling teams to ingest large volumes of data with predictable performance for content delivery, data lakes, and archival workflows.

Workflow Placement and Data Ingress

In operational workflows, Spaces sits at the edge of application ecosystems as a centralized data layer for static assets and large binary files. Data producers publish objects to a bucket using signed URLs or API calls, while consumers retrieve assets via time-bound URLs or direct API access.

For media-heavy workloads, a multi-region or region-agnostic strategy can reduce latency for global users by distributing content geographically and leveraging edge caching patterns.

In deployment pipelines, build artifacts and backups are uploaded to Spaces, enabling automated promotion of assets from development to staging to production with versioned objects to preserve historical states.

Delivery Role and Content Distribution

Spaces acts as the primary content store for assets that need reliable distribution. When integrated with a content delivery network, objects cached at the edge experience lower latency and improved end-user performance. The delivery model supports resumable uploads for large files, partial reads, and metadata tagging to enable efficient cataloging and retrieval.

Access control is implemented via access keys, bucket policies, and object-level permissions, allowing teams to define who can list, read, write, or delete assets. Integrations with application code allow dynamic URL generation, enabling temporary access windows and secure asset delivery without embedding long-term credentials in client applications.

Governance, Scale, and Lifecycle Management

Operational governance in Spaces focuses on lifecycle policies, replication strategies, and cost visibility. Lifecycle rules can automatically transition objects to cheaper storage tiers or expire obsolete data after a defined period, enabling automated data retention and compliance with organizational policies.

Scaling involves sharding data across buckets and possibly across regions to meet concurrency requirements. Monitoring includes usage metrics for bandwidth, requests, and error rates, with alerting tied to anomalies in access patterns or storage utilization.

Data integrity is ensured through checksums and versioning, supporting recovery workflows during incidents and minimizing data loss risks in large-scale environments.

Integration Patterns and Tooling

Operational teams integrate Spaces with CI/CD pipelines, analytics platforms, and backup utilities through standard APIs. Common patterns include object storage as a centralized artifact repository for builds, as a durable storage layer for machine learning datasets, and as a passive archive for compliance data.

Metadata tagging, lifecycle automation, and event-driven triggers enable orchestration across services such as:

  • ETL pipelines
  • Data catalogs
  • Notification systems

Observability is enhanced by mapping object events to centralized logging and telemetry, supporting faster diagnosis of anomalies related to uploads, downloads, or policy violations.

DigitalOcean Spaces and the tools around it

Tools we commonly connect with DigitalOcean Spaces through its API, webhooks and automation platforms. What is possible depends on your plan and setup.

How we can help with DigitalOcean Spaces

Features

5 guides

Integrations

8 guides

Automation

1 guide

Automation you build around Spaces — Spaces itself has no automation engine

DigitalOcean Spaces is object storage with an S3-compatible API, a web console, lifecycle rules, and an integrated CDN. It does not have a built-in workflow engine, and — unlike AWS S3 — it does not emit native event notifications when an object is created, changed, or deleted. Any automation involving Spaces has to be driven by something else: your own script, a CI pipeline, a cron job, or DigitalOcean Functions.

In practice this means automation patterns look like: a scheduled job that lists a bucket and processes new objects since the last run, a CI/CD pipeline that uploads build artifacts and lets lifecycle rules age them out, or an application that writes to Spaces and then explicitly calls a downstream webhook itself, because Spaces won’t call it for you.

Lifecycle rules are the one genuinely automated feature Spaces offers natively: you can configure a bucket or prefix to expire objects after a set number of days, useful for pruning old logs, temp uploads, or build artifacts without a separate cleanup job. That’s the extent of native automation — everything else needs external orchestration.

We also flag a real limitation before it becomes a production surprise: because there’s no event notification system, “trigger this the moment a file lands” workflows common with AWS S3 and Lambda don’t have a direct Spaces equivalent. If polling isn’t acceptable for your latency needs, we design the upload path so the uploading process itself fires the next step, rather than expecting Spaces to.

Where Spaces genuinely simplifies automation is as a stable, S3-API-compatible target: tools like rclone, s3cmd, the AWS CLI pointed at a Spaces endpoint, and most CI/CD storage plugins work against it with minimal changes, which keeps automation code portable if you ever need to move off it.

The realistic automation patterns we implement:

  • Configure lifecycle rules to auto-expire build artifacts, temp uploads, or old log files after a set retention window, without a separate cleanup job
  • Use a scheduled job to poll a bucket for new objects and process them, since Spaces has no native “on-upload” trigger to react to directly
  • Archive CI/CD build outputs to Spaces using the S3-compatible API from existing pipeline tooling with no custom integration required
  • Sync data into Spaces with rclone or s3cmd for scheduled batch transfers, since these tools already understand the S3 API Spaces implements
  • Set up the CDN in front of frequently-read objects to reduce repeated origin requests for static or slow-changing files
  • Rotate and scope Spaces access keys per automation job so a compromised script can’t reach unrelated buckets
  • Version build or release artifacts by folder/filename convention, since Spaces relies on your naming scheme rather than native object versioning for most accounts
  • Design the uploading process to call the next step directly — a webhook, a queue message — rather than relying on Spaces to notify anything
  • Monitor bucket size and request volume through the control panel or API to catch runaway storage growth from automated jobs
  • Keep automation single-region aware, since a job in one region reading from a Spaces bucket in another incurs cross-region latency that Spaces won’t optimize for you

The result is automation that’s honest about what Spaces provides — S3-compatible storage plus lifecycle expiry — and what it doesn’t — triggers, replication, orchestration — so we build the missing pieces with tools suited to your stack rather than assuming Spaces already has them.

Open the full guide: Automation →

AI capabilities

1 guide

Object storage for AI artifacts — not an AI platform

DigitalOcean Spaces is S3-compatible object storage: a place to put files — datasets, model checkpoints, training logs — and get them back over HTTP using the same API calls (and often the same SDKs) you’d use for AWS S3. It has no built-in machine learning, feature store, or model registry; what it gives you is durable storage that your training and inference code can read from and write to.

For AI workloads, we use Spaces as the artifact layer: raw and processed datasets, serialized model files, and evaluation outputs, organized by a naming/folder convention, since Spaces has no native metadata catalog or lineage tracking — those have to be built on top, typically as a manifest file or a separate metadata store alongside the objects.

A real constraint worth stating plainly: Spaces buckets live in a single region (currently NYC, SFO, AMS, SGP, or FRA) with no native cross-region replication. If your training and inference need data in multiple regions, that has to be handled by your own sync process — Spaces will not replicate objects across regions for you.

Spaces also has no native event notifications — unlike AWS S3, there’s no built-in trigger that fires when a new object lands in a bucket. If you want a training job to kick off automatically when a new dataset version is uploaded, that has to be driven by whatever process does the upload, or by polling, not by a Spaces-native hook.

Where Spaces does fit well is as cheap, S3-compatible storage for models and datasets your compute reads directly, with lifecycle rules to auto-expire old checkpoints and an integrated CDN if you need to serve static inference assets, like a web demo, at the edge.

We scope AI engagements around what Spaces actually is:

  • Store training datasets and preprocessed data as objects, organized by a folder/version naming convention, since Spaces has no native dataset versioning
  • Keep serialized model checkpoints and weights in Spaces, with lifecycle rules to expire older checkpoints automatically rather than accumulating them indefinitely
  • Serve small inference-time assets (tokenizer files, config JSON, static demo pages) via the built-in CDN for lower-latency retrieval
  • Archive raw telemetry and logs using lifecycle rules, since Spaces doesn’t have automatic storage-class tiering, only time-based expiry
  • Use the S3-compatible API with existing tools (boto3, aws-cli with a custom endpoint, rclone) rather than adopting a DigitalOcean-specific SDK
  • Scope access with Spaces access keys per project or environment, understanding this is simpler than AWS IAM and doesn’t support fine-grained per-object policies
  • Store evaluation results and run metadata as flat files alongside model artifacts, since there’s no native experiment-tracking feature to rely on
  • Plan for single-region storage; if training happens across regions, build your own sync step rather than expecting Spaces to replicate automatically
  • Reference objects in Spaces from pipeline code via access keys or pre-signed URLs, keeping training data out of source control
  • Trigger downstream jobs from your own orchestrator (cron, DigitalOcean Functions, a CI pipeline) after an upload completes, since Spaces has no native event notifications to hook into

The honest pitch: Spaces is a solid, inexpensive place to keep the files your AI workflows depend on. It is not a feature store, model registry, or orchestration layer — we help you decide what still needs to be built around it before you assume those capabilities exist.

Open the full guide: AI →

Comparisons

7 guides

DigitalOcean Spaces FAQ

10 questions
Can DigitalOcean Spaces scale with my storage and bandwidth needs as my application grows?

Spaces is object storage designed to scale without capacity planning -- there's no provisioning step for more storage the way there is with a block storage volume, and each Space's base price ($5/month, as of this writing) includes 250GB of storage and 1TB of outbound transfer, with usage beyond that billed per GB automatically rather than requiring a plan upgrade. Multiple Spaces can be created within one account, in different regions, without any coordination overhead.

Practical Details

The built-in CDN (enabled per-Space) caches public objects at edge locations, which is what actually handles bandwidth scaling for frequently-accessed public assets (images, static site assets) rather than every request hitting origin storage directly. For write-heavy or very high-request-volume workloads, Spaces' S3-compatible API behaves similarly to AWS S3 in terms of practical throughput, though DigitalOcean doesn't publish the same granular request-rate guarantees AWS does for S3.

Actionable Considerations

  • Enable the CDN on any Space serving public assets to offload repeated requests from origin storage, rather than relying on origin alone
  • Monitor usage against the included 250GB/1TB baseline and expect straightforward overage billing rather than needing to manually resize anything
  • Split very high-volume workloads across multiple Spaces or regions if you're seeing request-rate bottlenecks, similar to S3 key-prefix sharding practices
Does DigitalOcean Spaces include AI-ready features or integrations for machine learning workflows?

Spaces itself doesn't have built-in AI/ML-specific features -- it's general-purpose S3-compatible object storage, which makes it a common, straightforward choice as the storage layer for ML workflows (storing training datasets, model checkpoints, inference outputs) rather than a purpose-built ML data platform with native feature stores or dataset versioning.

Practical Details

Because Spaces speaks the S3 API, most ML frameworks and tools that support S3-compatible storage (boto3, many data-loading libraries) work against Spaces with just an endpoint override, without needing Spaces-specific integration code. DigitalOcean's GPU Droplets and App Platform can read/write directly to a Space using the same access key/secret credentials as any other S3-compatible client, which is the practical pattern for a DigitalOcean-hosted training or inference pipeline.

Actionable Considerations

  1. Use standard S3-compatible SDKs (boto3, aws-cli with a custom endpoint) rather than looking for Spaces-specific ML tooling that doesn't exist
  2. Store large training datasets or model artifacts in Spaces and stream/download them to GPU Droplets rather than expecting a managed ML data platform's built-in features
  3. Set appropriate object lifecycle policies to auto-expire old model checkpoints or intermediate training artifacts, since Spaces doesn't auto-manage ML-specific data retention
How do I migrate data into DigitalOcean Spaces from other storage solutions?

Because Spaces is S3-API-compatible, migration from AWS S3 or another S3-compatible provider is usually a straightforward sync operation using standard tools (rclone, s3cmd, or the AWS CLI pointed at Spaces' endpoint) rather than requiring a custom migration path or proprietary import tool. rclone specifically handles cross-provider sync well and is commonly used for bulk S3-to-Spaces migrations.

Practical Details

Spaces access requires its own Spaces access key/secret key pair, generated separately from a DigitalOcean account API token -- this is a common point of confusion for anyone expecting their DO API token to work directly with S3-compatible tools. Migration of very large datasets benefits from running the sync from a Droplet in the same region as the target Space, to avoid unnecessary cross-region transfer time and cost.

Actionable Considerations

  • Use rclone or s3cmd with Spaces' S3-compatible endpoint for migration rather than looking for a DigitalOcean-specific import tool
  • Generate a Spaces access key/secret pair specifically -- your DigitalOcean account API token won't authenticate against the S3-compatible API
  • Run large migrations from a Droplet in the same region as your target Space to minimize transfer time
How does DigitalOcean Spaces handle security and permissions for my data access?

Access control works at two levels -- Spaces access keys (S3-style key/secret pairs, generated per-account or scoped via Spaces Access Keys with restricted permissions) control API-level access, while object and bucket ACLs control whether individual files or an entire Space are public or private. Public Spaces expose objects to anyone with the URL, so defaulting new Spaces to private and making only specific objects public is the safer pattern than the reverse.

Practical Details

Spaces access keys can be scoped with granular permissions (read-only, specific Spaces only) rather than every key having full account-wide access, which matters for limiting blast radius if a key is ever leaked in a config file or repo. CORS configuration is separate from access control and needs to be set explicitly if browser-based clients (a web app uploading directly to a Space) need to interact with it.

Actionable Considerations

  1. Default new Spaces and objects to private, making only specific assets public deliberately rather than starting public and restricting later
  2. Scope Spaces access keys to the minimum permissions and specific Spaces a given application actually needs, rather than one broad key used everywhere
  3. Configure CORS explicitly for any Space that browser-based clients need to upload to or read from directly
How does DigitalOcean Spaces integrate with my existing development and deployment workflows?

Because Spaces is S3-API-compatible, it integrates with the same tooling ecosystem as AWS S3 -- most frameworks with an S3 storage adapter (Django's storages library, Rails' Active Storage, Node's aws-sdk) work against Spaces by simply pointing the endpoint configuration at Spaces' region-specific URL instead of AWS. This means existing S3-based application code often needs only a configuration change, not a rewrite, to work with Spaces.

Practical Details

Within the DigitalOcean ecosystem, App Platform and Droplets can read/write to a Space using standard environment-variable-based credentials, which is the typical pattern for a deployed app storing user uploads or static assets. CI/CD pipelines commonly use Spaces for build artifact storage or static site deployment, again using standard S3-compatible CLI tools rather than anything DigitalOcean-proprietary.

Actionable Considerations

  • Point existing S3-compatible application code at Spaces' region-specific endpoint as a configuration change, rather than rewriting storage integration code from scratch
  • Use environment variables for Spaces credentials in App Platform/Droplet deployments, consistent with standard S3-credential handling practices
  • Use standard S3-compatible CLI tools in CI/CD pipelines for build artifact storage rather than DigitalOcean-specific tooling, since none is required
Schema: how is the FAQ content structured for search engines?

A Space is a flat object store, S3-compatible in structure -- objects are stored by key (which can include "/" characters to simulate folder-like organization in the console and CLI tools, even though there's no true nested filesystem underneath). Each object carries standard metadata (content type, size, last-modified timestamp, and any custom metadata headers you set) that S3-compatible clients and CDNs read to serve files correctly.

Practical Details

Content-Type metadata specifically matters for anything served through the CDN or a browser -- an incorrectly set Content-Type (common when uploading via a generic script rather than an SDK that infers it) can cause a browser to download a file instead of rendering it, or a CDN to cache it incorrectly. Custom metadata headers can carry application-specific data (an upload source, a processing status) alongside the object itself, which many apps use instead of maintaining a separate database record purely for file metadata.

Actionable Considerations

  1. Use "/"-delimited key naming to organize objects in a folder-like structure, since there's no true nested filesystem to rely on otherwise
  2. Verify Content-Type is set correctly on upload, especially from custom scripts -- an SDK usually infers it correctly, but a raw API call might not
  3. Use custom object metadata for small amounts of file-related data instead of a separate database table, where that simplification genuinely fits your use case
What are best practices for permissions and access control when setting up DigitalOcean Spaces?

Scope Spaces access keys narrowly -- generate separate keys per application or environment (production vs. staging) rather than one shared key used everywhere, so a compromised key in one context doesn't expose every Space across your account. Default to private Spaces and objects, making specific assets public deliberately rather than starting from an open default.

Practical Details

For applications that need to let end users upload directly to a Space from the browser (avoiding routing large file uploads through your own server), pre-signed URLs (standard S3-compatible functionality) let you grant temporary, scoped upload/download permission without exposing your actual access keys to the client. Rotating access keys periodically, and immediately if one is ever accidentally committed to a public repo, is standard practice given how commonly this specific leak happens with S3-style credentials.

Actionable Considerations

  • Generate separate Spaces access keys per application/environment rather than one shared key everywhere, to limit blast radius from any single leak
  • Use pre-signed URLs for direct browser-to-Space uploads instead of exposing access keys to client-side code
  • Rotate access keys immediately if one is ever accidentally committed to a repository, and periodically as routine hygiene regardless
What engagement and performance can I expect when using DigitalOcean Spaces for my assets?

With the CDN enabled, publicly cached assets (images, static site files, downloadable content) are served from edge locations rather than origin storage on every request, which is what actually determines end-user load performance for frequently-accessed content -- origin-only performance without CDN is noticeably slower for globally distributed users. Performance for uncached, private, or infrequently-accessed objects depends on the region of the Space relative to where requests originate.

Practical Details

Because Spaces uses the S3 API, performance characteristics are broadly comparable to AWS S3 for similar access patterns, though DigitalOcean's smaller regional footprint (fewer regions than AWS) means the origin-to-user distance can be larger for some geographies. Cache invalidation on the CDN needs to be handled explicitly (purging or using versioned object keys) when updating a frequently-accessed asset, since stale cached content otherwise persists for the CDN's TTL.

Actionable Considerations

  1. Enable the CDN for any publicly-served, frequently-accessed content -- it's the single biggest performance lever available
  2. Choose a Space's region based on where most of your actual traffic originates, given DigitalOcean's smaller regional footprint compared to AWS
  3. Use versioned object keys or explicit CDN cache purging when updating frequently-accessed assets, rather than assuming an update propagates immediately
What is DigitalOcean Spaces and how do I start using it for my storage needs?

Spaces is DigitalOcean's S3-compatible object storage service -- designed for storing and serving unstructured data (images, videos, backups, static assets, user uploads) with a built-in CDN option, distinct from Droplets' block storage volumes which are meant for a server's own filesystem rather than app-facing object storage. Its S3 API compatibility means it works as a near-drop-in replacement for AWS S3 in most application code.

Practical Details

Getting started means creating a Space (choosing a region), generating a Spaces access key/secret pair from the API section of the control panel (separate from your DigitalOcean account token), and connecting via any S3-compatible SDK or the DigitalOcean control panel's own file browser for manual uploads. Pricing starts at a flat monthly rate including a storage and transfer allotment, with straightforward per-GB overage beyond that.

Actionable Considerations

  • Choose a Space's region based on where your application or its primary users are located, since region isn't easily changed after significant data is stored
  • Generate a dedicated Spaces access key rather than trying to use your DigitalOcean account API token, which won't work with S3-compatible tools
  • Use an existing S3 SDK/library in your application rather than building custom API integration, given Spaces' close S3 compatibility
What should I consider about pricing and cost management with DigitalOcean Spaces?

Spaces pricing is a flat monthly base rate (historically $5/month) that includes a set amount of storage (250GB) and outbound transfer (1TB), with usage beyond that billed per GB -- this flat-plus-overage model is simpler to predict than AWS S3's more granular per-request and per-GB pricing, though it can be less cost-efficient at very large scale or very low usage compared to pure pay-as-you-go pricing.

Practical Details

The CDN is included at no additional cost when enabled, unlike some cloud providers that charge separately for CDN bandwidth on top of storage egress -- this is a genuine cost advantage for content-heavy applications serving a lot of public static assets. Multiple Spaces within one account each carry their own base allotment, so consolidating related data into fewer Spaces (where it makes organizational sense) can be more cost-efficient than spreading data across many small Spaces each incurring the base rate.

Actionable Considerations

  1. Consolidate related data into fewer Spaces where organizationally sensible, rather than creating many small Spaces that each carry the flat base rate
  2. Factor in that CDN bandwidth is included at no extra charge, which can make Spaces meaningfully cheaper than providers charging separately for CDN egress
  3. Monitor actual storage and transfer usage against the included allotment regularly, since overage billing is straightforward but still worth tracking proactively

Get more from DigitalOcean Spaces

Whether you're rolling it out for the first time or fixing a setup that never quite worked, Consultants in a Box can help.

Book a free consultation

Tell us about your team and the software you need help with. We'll follow up to schedule a time to talk.

Open the form on its own page

Talk to a person

The fastest way is to pick a time. Prefer to write? Leave a message and we will email you back, usually the same business day.

Book a free call

By sending this you agree to our Terms and Privacy Policy.