General purpose bucket naming rules
When you create a general purpose bucket, consider length, valid characters, formatting, and uniqueness. The sections below summarize naming rules, examples, best practices, and how to create a bucket name that includes a globally unique identifier (GUID).
For information about object key names, see Creating object key names.
To create a general purpose bucket, see Creating a general purpose bucket.
Topics
- General purpose buckets naming rules
- Example general purpose bucket names
- Best practices
- Creating a bucket that uses a GUID in the bucket name
General purpose buckets naming rules
The following naming rules apply for general purpose buckets:
- Bucket names must be between 3 (min) and 63 (max) characters long.
- Bucket names can consist only of lowercase letters, numbers, periods (.), 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-. - Bucket names must not start with the prefix
vietnix-s3-demo-. - Bucket names must not end with the suffix
-s3alias. This suffix is reserved for access point alias names. See Access point aliases. - Bucket names must not end with the suffix
--ol-s3. This suffix is reserved for Object Lambda Access Point alias names. See How to use a bucket-style alias for your S3 bucket Object Lambda Access Point. - Bucket names must not end with the suffix
.mrap. This suffix is reserved for Multi-Region Access Point names. See Rules for naming Amazon S3 Multi-Region Access Points. - Bucket names must not end with the suffix
--x-s3. This suffix is reserved for directory buckets. See Directory bucket naming rules. - Bucket names must not end with the suffix
--table-s3. This suffix is reserved for S3 Tables buckets. See Amazon S3 table bucket, table, and namespace naming rules. - Buckets used with Amazon S3 Transfer Acceleration can't have periods (.) in their names. See Configuring fast, secure file transfers using Amazon S3 Transfer Acceleration.
Important
- Bucket names must be unique across all accounts.
- A bucket name can't be used by another account until the bucket is deleted. After deletion, another account can create a bucket with the same name and potentially receive requests intended for the deleted bucket. To avoid this, consider emptying a bucket and keeping it (and blocking requests) instead of deleting it.
- Don't include sensitive information in the bucket name. Bucket names are visible in object URLs.
Example general purpose bucket names
Allowed characters are lowercase letters (a-z), digits (0-9), hyphens (-), and optionally periods (.) though periods are not recommended for most uses.
Valid examples:
vnx-s3-demo-bucket1-a1b2c3d4-5678-90ab-cdef-example11111vnx-s3-demo-bucket
Valid but not recommended (contain periods; generally only for static website hosting):
example.comwww.example.commy.example.s3.bucket
Invalid examples:
vietnix_s3_demo_bucket(contains underscores)vietnixS3DemoBucket(contains uppercase letters)vietnix-s3-demo-bucket-(starts with reserved prefix and ends with a hyphen)example..com(contains two adjacent periods)192.168.5.4(formatted as an IP address)
Best practices
When naming your general purpose buckets, consider the following recommendations:
- Choose a bucket naming scheme that's unlikely to cause naming conflicts. If your application automatically creates buckets, ensure the logic generates a different name if a chosen name is already taken.
- Avoid using periods (.) in bucket names for best compatibility; periods prevent virtual-host-style addressing over HTTPS unless you manage certificate validation yourself. Static website hosting (HTTP only) is an exception.
- Choose relevant, descriptive names. Avoid using names associated with other organizations or trademarks (for example, avoid
Vietnixin your bucket name). - Don't rely on deleting buckets to reuse names; after deletion the name may not be immediately available and could be claimed by another account.