Follow bucket naming requirements for Lightsail object storage - Amazon Lightsail

Follow bucket naming requirements for Lightsail object storage

When you create a bucket in the Amazon Lightsail object storage service, you must give it a name. The name of the bucket is part of the URL that your customers will use when accessing objects that are stored in the bucket. For example, if you name your bucket amzn-s3-demo-bucket in the us-east-1 AWS Region, the URL for your bucket is amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com. You cannot change the name of your bucket after you create it. Keep in mind that your customers are able to see the bucket name that you specify. For more information about the Lightsail object storage service, see Object storage. For more information about creating buckets, see Create a bucket.

Bucket names must be DNS-compliant. Because of this, the following rules apply for naming buckets in Lightsail:

  • Bucket names must be between 3 and 56 characters long.

  • Bucket names can consist only of lowercase letters, numbers, and hyphens (-).

  • Bucket names must begin and end with a letter or number.

  • Hyphens (-) can separate words, but cannot be specified consecutively. For example, doc-example-bucket is allowed but doc--example--bucket isn't.

  • Bucket names must be unique within the aws (Standard Regions) partition, including buckets in Amazon Simple Storage Service (Amazon S3).

  • Bucket names must not start with the prefix amzn-s3-demo-.

  • Bucket names must not start with the prefix sthree-.

  • Bucket names must not start with the prefix sthree-configurator.

  • Bucket names must not end with the suffix -s3alias.

Example bucket names

The following example bucket names are valid and follow the recommended naming guidelines:

  • docexamplebucket1

  • log-delivery-march-2020

  • my-hosted-content

The following example bucket names are not allowed:

  • doc.example.bucket (contains periods)

  • doc--example--bucket (contains two consecutive hyphens)

  • doc-example-bucket- (ends with a hyphen)