bucket_name

Required
Type string
Module s3-bucket

Name of the S3 bucket. Must be globally unique, 3-63 characters, lowercase letters, numbers, and hyphens only.

Naming Rules

S3 bucket names must follow strict global naming rules:

  • Must be 3-63 characters long
  • Can only contain lowercase letters, numbers, and hyphens
  • Must start and end with a letter or number
  • Must be globally unique across all AWS accounts

Common Patterns

  • Environment-prefixed: {env}-{app}-{purpose} (e.g., prod-myapp-assets)
  • Account-suffixed: {name}-{account-id} (e.g., data-lake-123456789012)
  • Region-included: {name}-{region} (e.g., logs-us-east-1)

Best Practices

  • Use lowercase with hyphens for readability
  • Include environment or account identifiers for uniqueness
  • Avoid personally identifiable information in names
  • Consider including the AWS region for clarity
  • Use meaningful, descriptive names that indicate purpose

Full Module Example

module "s3_bucket" {
  source  = "registry.patterneddesigns.ca/essentials/s3-bucket/aws"
  version = "0.1.0"

  # bucket_name
  bucket_name = "..."

  # Other required inputs
}