General purpose buckets naming rules for AWS

Osama HaiDer
2 min readApr 24, 2024

--

The following naming rules apply to general-purpose buckets on AWS.

  • Bucket names must be between 3 (min) and 63 (max) characters long.
  • Bucket names can consist only of lowercase letters, numbers, dots (.), and hyphens (-).
  • Bucket names must begin and end with a letter or number.
  • Bucket names must not contain two adjacent periods.
  • Bucket names must not be formatted as an IP address (for example, 192.168.5.4).
  • Bucket names must not start with the prefix xn--.
  • Bucket names must not start with the prefix sthree- and the prefix sthree-configurator.
  • Bucket names must not end with the suffix -s3alias. This suffix is reserved for access point alias names.
  • Bucket names must not end with the suffix --ol-s3. This suffix is reserved for Object Lambda Access Point alias names.
  • Bucket names must be unique across all AWS accounts in all the AWS Regions within a partition. A partition is a grouping of Regions. AWS currently has three partitions: aws (Standard Regions), aws-cn (China Regions), and aws-us-gov (AWS GovCloud (US)).

Example general purpose bucket names on AWS

The following example bucket names are valid and follow the recommended naming guidelines for general-purpose buckets:

  • examplebucket
  • asset-images-2020
  • my-data-content

The following example bucket names are valid but not recommended for uses other than static website hosting:

The following example bucket names are not valid:

  • doc_example_bucket (contains underscores)
  • DocExampleBucket (contains uppercase letters)
  • doc-example-bucket- (ends with a hyphen)

--

--

Osama HaiDer
Osama HaiDer

Written by Osama HaiDer

SSE at TEO International | .Net | Azure | AWS | Web APIs | C#

No responses yet