ObjectStoreService
Connect S3 buckets and mount them into sandboxes.
ObjectStoreService manages object stores: named references to your own S3-compatible buckets (AWS S3, MinIO/Ceph, Cloudflare R2, ...). Credentials are project secrets referenced by name — create them first with daytona.secret.set(). A store can be mounted into a sandbox at creation (via object_store_mounts) or at runtime (via mount()); the sandbox sees the bucket as a FUSE filesystem. Obtain the service as daytona.object_store. See the object stores guide.
create()
Creates an object store referencing a bucket and its credential secrets. The store is ready immediately.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | str | — | Store name (unique within the project). |
bucket | str | — | Bucket name. |
access_key_secret | str | — | Name of the project secret holding the access key — not the value. |
secret_key_secret | str | — | Name of the project secret holding the secret key. |
endpoint | str | None | Custom S3 endpoint (MinIO, R2, ...). |
region | str | None | Bucket region. |
prefix | str | None | Key prefix to scope the mount to. |
path_style | bool | False | Use path-style addressing (typical for MinIO/Ceph). |
read_only | bool | False | Default mounts to read-only. |
provider | str | None | Provider hint, e.g. "AWS", "Minio", "Cloudflare". |
session_token_secret | str | None | Name of a secret holding a session token, for temporary credentials. |
Returns: the object-store dict (id, name, bucket, state, ...; credential fields expose only secret names, never values).
Note: The directory-listing cache TTL (
dir_cache_secs) can currently only be set through the REST API — it is not exposed in the SDKs yet.
get()
Fetches an object store by id or name.
Raises: DaytonaNotFoundError if it does not exist.
list()
Lists the project's object stores. Deleted stores are excluded unless include_deleted=True.
delete()
Deletes an object store. Accepts a store dict (its id is used) or a plain id/name string. Fails with a conflict while a live sandbox has it mounted.
Raises: DaytonaConflictError if the store is mounted by a live sandbox.
Runtime mounts
Mount and unmount stores on a running sandbox without recreating it. See mounting object stores.
mount()
Mounts an object store into a running sandbox at mount_path.
| Parameter | Type | Default | Description |
|---|---|---|---|
sandbox_id | str | — | Target sandbox id. |
object_store | str | — | Store id or name. |
mount_path | str | — | Absolute in-sandbox mount path. |
read_only | bool | None | Override the store's default read-only for this mount. |
unmount()
Unmounts a mount by name from a running sandbox.
list_mounts()
Lists a sandbox's current object-store mounts.
Returns: the list of mount records.
Mounting at creation: ObjectStoreMount
Attach stores at sandbox creation with the ObjectStoreMount dataclass in CreateSandbox*Params.object_store_mounts:
| Field | Type | Default | Description |
|---|---|---|---|
object_store | str | — | Store id or name (resolved server-side). |
mount_path | str | — | Absolute in-sandbox mount path. |
read_only | bool | None | Override the store's default read-only for this mount. |