s3CreateBucket

Creates an S3 bucket.

s3CreateBucket(bucketName [, acl, location, accessKeyId, secretAccessKey, host, timeout]) → returns void

Argument Reference

bucketName string
Required

The bucket name.

acl any

An array of structs, one for each ACL grant.

location string

The S3 region.

accessKeyId string

The S3 access key ID. Defaults to the lucee.s3.accesskeyid system property or environment variable.

secretAccessKey string

The S3 secret access key. Defaults to the lucee.s3.secretaccesskey system property or environment variable.

host string

The hostname of an S3-compatible provider, without https://. Defaults to Amazon AWS.

timeout numeric
Default: 10000

The timeout in milliseconds.

Compatibility

Lucee:

Requires the S3 extension.

RustCFML:

Names the first argument bucket and the secret key argument secretKey. location defaults to us-east-1. Doesn't list timeout.

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