DreamObjects Bucket Names

 

Overview

When choosing a name for your bucket, you’ll need to be careful to select something that’s DNS-compliant and unique. That’s because your bucket names are used as part of the hostname in the URL when accessing its contents.

Why the bucket names have to be unique

Objects stored in DreamObjects are identified by a URL that looks like this:

https://$BUCKET_NAME.s3.us-east-005.dream.io/$OBJECT_NAME

Since the bucket name is part of the hostname (in the URL), and hostnames must be unique, the bucket name also must be unique. For example, a bucket named “my-bucket” would have the URL:

https://my-bucket.s3.us-east-005.dream.io

This means that there can only be one bucket called “my-bucket” on DreamObjects. Therefore, the easiest way to create a new bucket is to assign a random name and create a domain alias for it using DreamHost Control Panel.

Rules to name a bucket

The following explains the rules to name a bucket: 

  • Can be 6-63 characters in length
  • Can use characters (a-z) and (-)
  • Cannot use a period (.)
  • May not start with (b2-) as this prefix is reserved
  • Cannot include any Unicode characters, emoji, or non-printable ASCII

How is DreamHost enforcing this?

Many S3-compatible clients have already enforced these stricter rules when creating new buckets. If you use a client that doesn’t enforce all of these rules, DreamObjects will return an error stating the bucket name is invalid.

If your client shows you the HTTP error response, you’ll see a 400 InvalidBucketName response code, including a link to this article.

See also

Did this article answer your questions?

Still not finding what you're looking for?