Guide
How to mount an S3 bucket in a sandbox
Call `mountS3` with the bucket and keys, and the bucket appears as a folder in the sandbox. No FUSE packages to install and no credentials on a command line.
How do I mount an S3 bucket in a sandbox?
One call with the bucket name and credentials; it returns the path.
const path = await sbx.mountS3({
bucket: "datasets",
prefix: "train", // optional: one "folder" of the bucket
accessKeyId, secretAccessKey,
readOnly: true,
});
await sbx.exec(`ls ${path}`); // /mnt/datasetsDoes it work with R2, GCS, MinIO or Tigris?
Yes. Pass the store's endpoint and Jasmine treats it as S3-compatible.
Do I need to install anything in my image?
No. The sandbox's init process doubles as FUSE's mount helper, and the daemon copies a pinned rclone into the sandbox on its first mount.
Are my credentials safe?
They go into the mount process's environment, never onto its command line, and stay inside that one sandbox.
Leave the keys out to mount a public bucket anonymously.
How do I unmount it?
Call sbx.unmount(path), or DELETE /v1/sandboxes/<id>/mounts?path=<path>.
Related
- How to give an AI agent a headless browser
- How to fork an AI agent's environment (snapshots for branching and RL)
- How to run AI-generated code safely
- The best sandboxes for AI agents, measured
Updated 2026-11-25.
Try it in a minute
Self-host it with one command, free. Jasmine Cloud, the hosted version, is in early access.