Bucket
The Bucket resource lets you create and manage Amazon S3 buckets for object storage.
Minimal Example
Section titled “Minimal Example”Create a basic S3 bucket with default settings:
import { Bucket } from "alchemy/aws";
const bucket = await Bucket("storage", { bucketName: "my-app-storage", tags: { Environment: "production", },});
Bucket with Versioning
Section titled “Bucket with Versioning”Create a bucket with versioning enabled for change tracking:
import { Bucket } from "alchemy/aws";
const versionedBucket = await Bucket("document-archive", { bucketName: "document-archive", tags: { Environment: "production", Purpose: "document-storage", Versioning: "enabled", },});
Development Bucket
Section titled “Development Bucket”Create a temporary bucket for development/testing:
import { Bucket } from "alchemy/aws";
const devBucket = await Bucket("dev-testing", { bucketName: "dev-testing", tags: { Environment: "development", Temporary: "true", },});