Skip to main content
To connect a bucket for storing data from the sandbox, we will use the FUSE file system to mount the bucket to the sandbox. You will need to create a custom sandbox template with the FUSE file system installed. The guide for building a custom sandbox template can be found here.

Google Cloud Storage

Prerequisites

To use Google Cloud Storage, you’ll need a bucket and a service account. You can create a service account here and a bucket here. If you want to write to the bucket, make sure the service account has the Storage Object User role for this bucket. You can find a guide on creating a service account key here.

Mounting the bucket

To use the Google Cloud Storage we need to install the gcsfuse package. There’s simple template that can be used to create a container with the gcsfuse installed.
The bucket is mounted during the sandbox runtime using the gcsfuse command.

Flags

The complete list of flags is available here.

Allow the default user to access the files

To allow the default user to access the files, we can use the following flags:

Amazon S3

To use Amazon S3, we can use the s3fs package. The template setup is similar to that of Google Cloud Storage.
Similar to Google Cloud Storage, the bucket is mounted during the runtime of the sandbox. The s3fs command is used to mount the bucket to the sandbox.

Flags

The complete list of flags is available here.

Allow the default user to access the files

To allow the default user to access the files, add the following flag:

Cloudflare R2

For Cloudflare R2, we can use a setup very similar to S3. The template remains the same as for S3. However, the mounting differs slightly; we need to specify the endpoint for R2.

Flags

It’s the same as for S3.