Amazon S3 bucket naming rules are specific guidelines that ensure global uniqueness and DNS compatibility, varying slightly between general purpose buckets, directory buckets, and table buckets.
Amazon S3 bucket naming rules are essential to understand because bucket names must be globally unique across all AWS accounts and cannot be changed after creation . The rules differ based on the bucket type: general purpose buckets (the default), directory buckets (for S3 Express One Zone), and table buckets (for Apache Iceberg tables). Following these rules ensures your buckets are properly accessible and compatible with AWS services.
Bucket names must be between 3 and 63 characters long .
Names can consist only of lowercase letters, numbers, dots (.), and hyphens (-) .
Names must begin and end with a letter or number .
Names must not contain two adjacent periods .
Names must not be formatted as an IP address (e.g., 192.168.5.4) .
Names must not start with the prefix 'xn--' .
Names must not end with the suffix '-s3alias' or '--ol-s3' or '.mrap' (reserved for access points and multi-region access points) .
Buckets used with S3 Transfer Acceleration cannot have dots in their names .
Names must be globally unique within an AWS partition .
Directory bucket names follow a specific format: base-name--zone-id--x-s3 .
Names must be unique within the chosen Availability Zone (not globally) .
Total length including suffix must be between 3 and 63 characters .
Names consist only of lowercase letters, numbers, and hyphens .
Must begin and end with a letter or number .
Must include the suffix '--zone-id--x-s3' .
Cannot start with prefixes like 'xn--', 'sthree-', or 'amzn-s3-demo-' .
Cannot end with suffixes '-s3alias', '--ol-s3', or '.mrap' .
Table bucket names must be between 3 and 63 characters long .
Names consist only of lowercase letters, numbers, and hyphens .
Must begin and end with a letter or number .
Cannot contain underscores (_) or periods (.) .
Cannot start with reserved prefixes: 'xn--', 'sthree-', 'amzn-s3-demo-', 'aws' .
Cannot end with reserved suffixes: '-s3alias', '--ol-s3', '--x-s3', '--table-s3' .
Table bucket names need only be unique within your account and region, not globally .
Once a bucket is created, its name cannot be changed . If you delete a bucket and want to reuse the name, it can take 48-72 hours for the name to become available again . For best compatibility, AWS recommends avoiding dots in bucket names for general purpose buckets, except when used exclusively for static website hosting . This is because security certificates used for virtual hosting over HTTPS don't work with buckets containing dots in their names .
docexamplebucket1
log-delivery-march-2020
my-hosted-content
doc_example_bucket (contains underscores)
DocExampleBucket (contains uppercase letters)
doc-example-bucket- (ends with a hyphen)
192.168.5.4 (IP address format)