‹ Return to Overviews

Bucket naming rules in Amazon Lightsail

Last updated: July 14, 2021

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 in Amazon Lightsail. For more information about creating buckets, see Creating buckets in Amazon Lightsail.

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-

Managing buckets and objects in Lightsail

These are the general steps to manage your Lightsail object storage bucket:

  1. Learn about objects and buckets in the Amazon Lightsail object storage service. For more information, see Object storage in Amazon Lightsail.

  2. Learn about the names that you can give your buckets in Amazon Lightsail. For more information, see Bucket naming rules in Amazon Lightsail.

  3. Get started with the Lightsail object storage service by creating a bucket. For more information, see Creating buckets in Amazon Lightsail.

  4. Learn about the access permissions that you can configure for your bucket. You can make all objects in your bucket public or private, or you can choose to make individual objects public. You can also grant access to your bucket by creating access keys, attaching instances to your bucket, and granting access to other AWS accounts. For more information, see Understanding bucket permissions in Amazon Lightsail.

    After learning about bucket access permissions, see the following guides to grant access to your bucket:

  5. Create an IAM policy that grants a user the ability to manage a bucket in Lightsail. For more information, see IAM policy to manage buckets in Amazon Lightsail.

  6. Learn about the way that objects in your bucket are labeled and identified. For more information, see Understanding object key names in Amazon Lightsail.

  7. Learn how to upload files and manage objects in your buckets. For more information, see the following guides.

  8. Enable object versioning to preserve, retrieve, and restore every version of every object stored in your bucket. For more information, see Enabling and suspending object versioning in a bucket in Amazon Lightsail.

  9. After enabling object versioning, you can restore previous versions of objects in your bucket. For more information, see Restoring previous versions of objects in a bucket in Amazon Lightsail.

  10. Monitor the utilization of your bucket. For more information, see Viewing metrics for your bucket in Amazon Lightsail.

  11. Configure an alarm for bucket metrics to be notified when the utilization of your bucket crosses a threshold. For more information, see Creating bucket metric alarms in Amazon Lightsail.

  12. Change the storage plan of your bucket if it's running low on storage and network transfer. For more information, see Changing the plan of your bucket in Amazon Lightsail.

  13. Learn how to connect your bucket to other resources. For more information, see the following tutorials.

  14. Delete your bucket if you're no longer using it. For more information, see Deleting buckets in Amazon Lightsail.