Skip to main content
The Deno 2 Release Candidate is here
Learn more
Latest
method S3.prototype.createBucket
import { S3 } from "https://deno.land/x/s3@0.5.0/src/client.ts";

Creates a new S3 bucket. By default, the bucket is created in the region specified with the S3 options. If not specified the US East (N. Virginia) region is used. Optionally, you can specify a Region with the locationConstraint option.

const bucket: S3Bucket = await s3.createBucket("my-bucket", {
  locationConstraint: "EU",
});

Parameters

bucket: string
optional
options: CreateBucketOptions