Skip to content
SaltwaterC edited this page Jul 30, 2012 · 4 revisions

About

S3 helper for easy creations of buckets.

Reference

s3.createBucket(bucketName, cannedAcl, region, callback)
  • 'bucketName' - the Bucket Name.
  • 'cannedAcl' - the S3 Canned ACL.
  • 'region' - the region where to create the S3 bucket. Passing boolean false makes it to use us-east-1 which is the default S3 region. This argument accepts the same values as the query.setRegion() helper. It patches the S3 API inconsistencies. The allowed values:
  • 'us-east-1' || false => Virginia
  • 'us-west-1' => N. California
  • 'us-west-2' => Oregon
  • 'eu-west-1' => Ireland
  • 'ap-southeast-1' => Singapore
  • 'ap-northeast-1' => Tokyo
  • 'callback' - the callback that is executed when the processing finishes. It has a couple of arguments: error and result.
  • If there's an error, the callback receives the error argument as Error instance.
  • If the error argument is null, then the response argument contains the response.headers object as returned by the node.js core HTTPS client.

This helper calls s3.setBucket() transparently. This means that after the bucket is created, you operate into its context.

Clone this wiki locally