s3CreateBucket

Creates a new S3 (or S3-compatible) bucket in the given location/region.

s3CreateBucket(bucket [, acl, location, accessKeyId, secretKey, host]) → returns void

This function requires RustCFML.  Not supported on Lucee, Adobe ColdFusion, etc.

Argument Reference

bucket string
Required

The name of the bucket to create.

acl string

Optional bucket ACL to apply (accepted for compatibility).

location string
Default: us-east-1

Bucket location/region constraint. Defaults to us-east-1.

accessKeyId string

Inline AWS access key id. Overrides credentials from Application.cfc and environment variables.

secretKey string

Inline AWS secret access key.

host string

Inline endpoint URL for S3-compatible providers (e.g. Cloudflare R2, MinIO).

Examples
Sample code invoking the s3CreateBucket function

Creates a bucket in the default region.

s3CreateBucket("my-new-bucket");

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub