Lucee Function Reference

s3createbucket()

Creates a bucket on S3.

Example

s3createbucket(string bucketName,[object acl,[string location,[string accessKeyId,[string secretAccessKey,[string host,[number timeout]]]]]]):void

Arguments

The arguments for this function are set. You can not use other arguments except the following ones.
Name Type Required Default Value Description
bucketName string  Yes   Name of the bucket to create  
acl object  No   an array of struct where each struct represents an ACL grant  
location string  No   location of the S3 storage.  
accessKeyId string  No   S3 accessKeyId, if not defined it checks the system property/environment variable for [lucee.s3.accesskeyid].  
secretAccessKey string  No   S3 secretAccessKey, if not defined it checks the system property/environment variable for [lucee.s3.secretaccesskey].  
host string  No   The hostname of the S3-compatible provider to connect to. Only the hostname should be provided, not the full URL (e.g., omit "https://"). If not set, Amazon AWS (`s3.amazonaws.com`) is used by default.
**Examples of valid hostnames for different providers**:
  • **Amazon S3**: `s3.amazonaws.com`
  • **Wasabi**: `s3.us-west-1.wasabisys.com`
  • **DigitalOcean Spaces**: `nyc3.digitaloceanspaces.com`
  • **Google Cloud Storage**: `storage.googleapis.com`
  • **MinIO (Self-hosted)**: `minio.yourdomain.com`  
  • timeout number  No 10000 timeout for this execution