Bucket naming rules in Amazon Lightsail - Amazon Lightsail

Bucket naming rules in Amazon Lightsail

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 DOC-EXAMPLE-BUCKET in the us-east-1 AWS Region, the URL for your bucket is DOC-EXAMPLE-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 is not allowed.

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

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

  • doc--example--bucket

  • doc-example-bucket-