General purpose buckets naming rules for AWS
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 prefixsthree-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), andaws-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:
examplebucket.com
www.assetimages.com
my.data.s3.bucket
The following example bucket names are not valid:
doc_example_bucket
(contains underscores)DocExampleBucket
(contains uppercase letters)doc-example-bucket-
(ends with a hyphen)