Setup
The S3 VFS needs an AWS access key pair that can read the bucket, and write to it for awrite mount.
- Open the IAM console, then Users > Create user.
- Attach
AmazonS3ReadOnlyAccess, orAmazonS3FullAccessfor writes. A policy that grantss3:ListBucket,s3:GetObject,s3:PutObjectands3:DeleteObjecton the one bucket is narrower. - Open the user, then Security credentials > Create access key > Application running outside AWS.
- Copy the Access key ID and Secret access key. AWS shows the secret only once.
- With
~/.aws/credentialsset up, giveaws_profile(profilein TypeScript) instead of the key pair. With no credentials at all, the AWS credential chain applies. - A browser mount can fetch presigned URLs from a backend instead of holding keys; see the TypeScript S3 guide.
Connect
- YAML
- Python
- TypeScript
workspace.yaml
Layout
- Each object key is a file path; folders are key prefixes, and the bucket holds no directory objects.
key_prefix(keyPrefixin TypeScript) scopes every operation to one subpath of the bucket, such asusers/42/. Leading slashes are dropped and a trailing/is added; unset or empty means no prefix.grep -r,findanddustop after 1000 files; a glob matching more,tar -c,cp -randrm -rare refused.
Sample runs
write mount, redirects, cp, mv and rm change objects in the bucket.
Set default_content_type (defaultContentType in TypeScript) to stamp every
upload with one content type. Unset, S3 picks its own default, and the
browser’s presigned PUT sends application/octet-stream.
S3-compatible VFSes
Howwrite: conditional behaves depends on where the bucket is:
- AWS S3, and the VFSes built on it (R2, GCS, Wasabi and the rest): writes, copies and deletes all carry the condition. A provider that ignores the condition on a copy or a delete runs it unconditioned.
- MinIO, and the
s3VFS pointed at a non-AWS endpoint: only writes carry it. Mirage refuses anything that would copy or delete within the mount (cp,mv,rm,find -delete) withENOTSUP. - A TypeScript browser mount signed by presigned URLs: cannot declare
write: conditional.
SDK guides
Python
Every config field, the VFS.md and write support.
TypeScript
Every config field, the VFS.md and write support.