

# Manage files and folders in Lightsail buckets
Bucket objects

You can view all objects stored in your bucket in the Amazon Lightsail object storage service by using the Lightsail console. You can also use the AWS Command Line Interface (AWS CLI) and AWS SDKs to list object keys in your bucket. For more information about buckets, see [Object storage](buckets-in-amazon-lightsail.md).

## Filter objects using the Lightsail console


Complete the following procedure to view objects stored in a bucket using the Lightsail console.

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the left navigation pane, choose **Storage**.

1. Choose the name of the bucket for which you want to view objects.

1. The **Objects browser** pane in the **Objects tab** displays the objects and folders that are stored in your bucket.  
![\[The object browser pane in the Lightsail console\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-bucket-object-browser-pane.png)

1. Browse to the location of the object for which you want to view properties.

1. Add a check mark next to the object for which you want to view properties.

1. The **Object properties** pane on the right side of the page displays information about the object.  
![\[The object properties pane in the Lightsail console\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-bucket-object-properties-pane.png)

   The information displayed includes:

   1. Links to view and download the object.

   1. Actions menu (⋮) to copy or delete the object. For more information about copying and deleting objects, see [Copy or move objects in a bucket in Amazon Lightsail](amazon-lightsail-copying-moving-bucket-objects.md) and [Delete bucket objects](amazon-lightsail-deleting-bucket-objects.md).

   1. Object size, and last modified timestamp.

   1. The access permission of the individual object, which could be private or public (read-only). For more information about object permissions, see [Bucket permissions](amazon-lightsail-understanding-bucket-permissions.md).

   1. The metadata of the object. The content type (`ContentType`) key is the only metadata supported by the Lightsail object storage service at this time.

   1. The object key value tags. For more information, see [Tag bucket objects](amazon-lightsail-tagging-bucket-objects.md).

   1. The option to manage stored versions of the object. For more information, see [Enable and suspend object versioning in a bucket](amazon-lightsail-managing-bucket-object-versioning.md).
**Note**  
When you select multiple objects, the **Object properties** pane displays only the total size of the selected objects.

## View objects using the AWS CLI


Complete the following procedure to list object keys in a bucket using the AWS Command Line Interface (AWS CLI). You do this by using the `list-objects-v2` command. For more information, see [list-objects-v2](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-objects-v2.html) in the *AWS CLI Command Reference*.

**Note**  
You must install the AWS CLI and configure it for Lightsail and Amazon S3 before continuing with this procedure. For more information, see [Configure the AWS Command Line Interface to work with Amazon Lightsail](lightsail-how-to-set-up-and-configure-aws-cli.md).

1. Open a Command Prompt or Terminal window.

1. Enter one of the following commands.
   + Enter the following command to list all object keys in your bucket.

     ```
     aws s3api list-objects-v2 --bucket BucketName --query "Contents[].{Key: Key, Size: Size}"
     ```

     In the command, replace *BucketName* with the name of the bucket for which you want to list all objects.
   + Enter the following command to list objects that start with a specific object key name prefix.

     ```
     aws s3api list-objects-v2 --bucket BucketName --prefix ObjectKeyNamePrefix --query "Contents[].{Key: Key, Size: Size}"
     ```

     In the command, replace the following example text with your own:
     + *BucketName* - The name of the bucket for which you want to list all objects.
     + *ObjectKeyNamePrefix* - An object key name prefix to limit the response to keys that begin with the specified prefix.
**Note**  
These commands use the `--query` parameter to filter the response of the `list-objects-v2` request to the key value and size of each object.

   Examples:

   Listing all object keys in a bucket:

   ```
   aws s3api list-objects-v2 --bucket amzn-s3-demo-bucket --query "Contents[].{Key: Key, Size: Size}"
   ```

   For the preceding command, you should see a result similar to the following example.  
![\[Result of the AWS CLI list-objects-v2 command\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-s3api-list-objects-v2-result.png)

   Listing object keys that start with the `archived/` object key name prefix:

   ```
   aws s3api list-objects-v2 --bucket amzn-s3-demo-bucket --prefix archived/ --query "Contents[].{Key: Key, Size: Size}"
   ```

   For the preceding command, you should see a result similar to the following example.  
![\[Result of the AWS CLI list-objects-v2 command\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-s3api-list-objects-v2-prefix-result.png)

## Manage buckets and objects


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](buckets-in-amazon-lightsail.md).

1. Learn about the names that you can give your buckets in Amazon Lightsail. For more information, see [Bucket naming rules in Amazon Lightsail](bucket-naming-rules-in-amazon-lightsail.md).

1. Get started with the Lightsail object storage service by creating a bucket. For more information, see [Creating buckets in Amazon Lightsail](amazon-lightsail-creating-buckets.md).

1. Learn about security best practices for buckets and 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 [Security Best Practices for Amazon Lightsail object storage](amazon-lightsail-bucket-security-best-practices.md) and [Understanding bucket permissions in Amazon Lightsail](amazon-lightsail-understanding-bucket-permissions.md).

   After learning about bucket access permissions, see the following guides to grant access to your bucket:
   + [Block public access for buckets in Amazon Lightsail](amazon-lightsail-block-public-access-for-buckets.md)
   + [Configuring bucket access permissions in Amazon Lightsail](amazon-lightsail-configuring-bucket-permissions.md)
   + [Configuring access permissions for individual objects in a bucket in Amazon Lightsail](amazon-lightsail-configuring-individual-object-access.md)
   + [Creating access keys for a bucket in Amazon Lightsail](amazon-lightsail-creating-bucket-access-keys.md)
   + [Configuring resource access for a bucket in Amazon Lightsail](amazon-lightsail-configuring-bucket-resource-access.md)
   + [Configuring cross-account access for a bucket in Amazon Lightsail](amazon-lightsail-configuring-bucket-cross-account-access.md)

1. Learn how to enable access logging for your bucket, and how to use access logs to audit the security of your bucket. For more information, see the following guides.
   + [Access logging for buckets in the Amazon Lightsail object storage service](amazon-lightsail-bucket-access-logs.md)
   + [Access log format for a bucket in the Amazon Lightsail object storage service](amazon-lightsail-bucket-access-log-format.md)
   + [Enabling access logging for a bucket in the Amazon Lightsail object storage service](amazon-lightsail-enabling-bucket-access-logs.md)
   + [Using access logs for a bucket in Amazon Lightsail to identify requests](amazon-lightsail-using-bucket-access-logs.md)

1. 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](amazon-lightsail-bucket-management-policies.md).

1. Learn about the way that objects in your bucket are labeled and identified. For more information, see [Understanding object key names in Amazon Lightsail](understanding-bucket-object-key-names-in-amazon-lightsail.md).

1. Learn how to upload files and manage objects in your buckets. For more information, see the following guides.
   + [Uploading files to a bucket in Amazon Lightsail](amazon-lightsail-uploading-files-to-a-bucket.md)
   + [Uploading files to a bucket in Amazon Lightsail using multipart upload](amazon-lightsail-uploading-files-to-a-bucket-using-multipart-upload.md)
   + [Viewing objects in a bucket in Amazon Lightsail](#amazon-lightsail-viewing-objects-in-a-bucket)
   + [Copying or moving objects in a bucket in Amazon Lightsail](amazon-lightsail-copying-moving-bucket-objects.md)
   + [Downloading objects from a bucket in Amazon Lightsail](amazon-lightsail-downloading-bucket-objects.md)
   + [Filtering objects in a bucket in Amazon Lightsail](amazon-lightsail-filtering-bucket-objects.md)
   + [Tagging objects in a bucket in Amazon Lightsail](amazon-lightsail-tagging-bucket-objects.md)
   + [Deleting objects in a bucket in Amazon Lightsail](amazon-lightsail-deleting-bucket-objects.md)

1. 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](amazon-lightsail-managing-bucket-object-versioning.md).

1. 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](amazon-lightsail-restoring-bucket-object-versions.md).

1. Monitor the utilization of your bucket. For more information, see [Viewing metrics for your bucket in Amazon Lightsail](amazon-lightsail-viewing-bucket-metrics.md).

1. 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](amazon-lightsail-adding-bucket-metric-alarms.md).

1. 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](amazon-lightsail-changing-bucket-plans.md).

1. Learn how to connect your bucket to other resources. For more information, see the following tutorials.
   + [Tutorial: Connecting a WordPress instance to an Amazon Lightsail bucket](amazon-lightsail-connecting-buckets-to-wordpress.md)
   + [Tutorial: Using an Amazon Lightsail bucket with a Lightsail content delivery network distribution](amazon-lightsail-using-distributions-with-buckets.md)

1. Delete your bucket if you're no longer using it. For more information, see [Deleting buckets in Amazon Lightsail](amazon-lightsail-deleting-buckets.md).

**Topics**
+ [

## Filter objects using the Lightsail console
](#view-objects-lightsail-console)
+ [

## View objects using the AWS CLI
](#view-objects-aws-cli)
+ [

## Manage buckets and objects
](#viewing-objects-managing-buckets-and-objects)
+ [Copy and move objects](amazon-lightsail-copying-moving-bucket-objects.md)
+ [Delete objects](amazon-lightsail-deleting-bucket-objects.md)
+ [Download objects](amazon-lightsail-downloading-bucket-objects.md)
+ [Filter objects](amazon-lightsail-filtering-bucket-objects.md)
+ [Manage object versioning](amazon-lightsail-managing-bucket-object-versioning.md)
+ [Restore object versions](amazon-lightsail-restoring-bucket-object-versions.md)
+ [Tag objects](amazon-lightsail-tagging-bucket-objects.md)

# Copy and move objects between Lightsail buckets
Copy and move objects

You can copy objects that are already stored in your bucket in the Amazon Lightsail object storage service. In this guide, we show you how to copy objects using the Lightsail console and using the AWS Command Line Interface (AWS CLI). Copy objects in your bucket to create duplicate copies of objects, rename objects, or move objects across Lightsail locations (for example, moving objects from one AWS Region to another one, in which Lightsail is available). You can copy objects across locations only using the AWS APIs, AWS SDKs, and AWS Command Line Interface (AWS CLI).

For more information about buckets, see [Object storage](buckets-in-amazon-lightsail.md).

## Restrictions for copying objects


You can create a copy of an object that is up to 2 GB in size by using the Lightsail console. You can create a copy of an object that is up to 5 GB in size with a single copy object action by using the AWS Command Line Interface (AWS CLI), AWS APIs, and AWS SDKs. To copy an object that is greater than 5 GB in size, you must use the multipart upload action of the AWS CLI, AWS APIs, and AWS SDKs. For more information, see [Upload files to a bucket using multipart upload](amazon-lightsail-uploading-files-to-a-bucket-using-multipart-upload.md).

## Copy objects using the Lightsail console


Complete the following procedure to copy an object stored in a bucket using the Lightsail console. To move an object in a bucket, you should copy it to the new location, and delete the original object.

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the left navigation pane, choose **Storage**.

1. Choose the name of the bucket for which you want to copy an object.

1. In the **Objects** tab, use the **Objects browser pane** to browse to the location of the object that you want to copy.

1. Add a check mark next to the object that you want to copy.

1. In the **Object information** pane, choose the actions (⋮) menu, and then choose **Copy to**.

1. In the **Select destination** pane that appears, browse to the location in the bucket where you want to copy the selected object. You can also create a new path by entering folder names into the **Destination path** text box.

1. Choose **Copy** to copy the object to the selected or specified destination. Otherwise, choose **No, cancel**.

   A **Copy complete** message is displayed when the object is successfully copied. You should delete the original object if your intent was to move the object. For more information, see [Delete bucket objects](amazon-lightsail-deleting-bucket-objects.md).

## Copy objects using the AWS CLI


Complete the following procedure to copy objects in a bucket using the AWS Command Line Interface (AWS CLI). You do this by using the `copy-object` command. For more information, see [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) in the *AWS CLI Command Reference*.

**Note**  
You must install the AWS CLI and configure it for Lightsail and Amazon S3 before continuing with this procedure. For more information, see [Configure the AWS CLI to work with Lightsail](lightsail-how-to-set-up-and-configure-aws-cli.md).

1. Open a Command Prompt or Terminal window.

1. Enter the following command to copy an object in your bucket.

   ```
   aws s3api copy-object --copy-source SourceBucketNameAndObjectKey --key DestinationObjectKey --bucket DestinationBucketName --acl bucket-owner-full-control
   ```

   In the command, replace the following example text with your own:
   + *SourceBucketNameAndObjectKey* - The name of the bucket in which the source object currently exists, and the full object key of the object to be copied. For example, to copy the object `images/sailbot.jpg` from the bucket `amzn-s3-demo-bucket`, specify `amzn-s3-demo-bucket/images/sailbot.jpg`.
   + *DestinationObjectKey* - The full object key of the new object copy.
   + *DestinationBucket* - The name of the destination bucket.

   Examples:
   + Copying an object in a bucket to the same bucket:

     ```
     aws s3api copy-object --copy-source amzn-s3-demo-bucket1/images/sailbot.jpg --key media/sailbot.jpg --bucket amzn-s3-demo-bucket --acl bucket-owner-full-control
     ```
   + Copying an object from one bucket to another bucket:

     ```
     aws s3api copy-object --copy-source amzn-s3-demo-bucket1/images/sailbot.jpg --key images/sailbot.jpg --bucket amzn-s3-demo-bucket2 --acl bucket-owner-full-control
     ```

   You should see a result similar to the following example:  
![\[Result of the AWS CLI copy-object command\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-s3api-copy-object-result.png)

## Manage buckets and objects


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](buckets-in-amazon-lightsail.md).

1. Learn about the names that you can give your buckets in Amazon Lightsail. For more information, see [Bucket naming rules in Amazon Lightsail](bucket-naming-rules-in-amazon-lightsail.md).

1. Get started with the Lightsail object storage service by creating a bucket. For more information, see [Creating buckets in Amazon Lightsail](amazon-lightsail-creating-buckets.md).

1. Learn about security best practices for buckets and 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 [Security Best Practices for Amazon Lightsail object storage](amazon-lightsail-bucket-security-best-practices.md) and [Understanding bucket permissions in Amazon Lightsail](amazon-lightsail-understanding-bucket-permissions.md).

   After learning about bucket access permissions, see the following guides to grant access to your bucket:
   + [Block public access for buckets in Amazon Lightsail](amazon-lightsail-block-public-access-for-buckets.md)
   + [Configuring bucket access permissions in Amazon Lightsail](amazon-lightsail-configuring-bucket-permissions.md)
   + [Configuring access permissions for individual objects in a bucket in Amazon Lightsail](amazon-lightsail-configuring-individual-object-access.md)
   + [Creating access keys for a bucket in Amazon Lightsail](amazon-lightsail-creating-bucket-access-keys.md)
   + [Configuring resource access for a bucket in Amazon Lightsail](amazon-lightsail-configuring-bucket-resource-access.md)
   + [Configuring cross-account access for a bucket in Amazon Lightsail](amazon-lightsail-configuring-bucket-cross-account-access.md)

1. Learn how to enable access logging for your bucket, and how to use access logs to audit the security of your bucket. For more information, see the following guides.
   + [Access logging for buckets in the Amazon Lightsail object storage service](amazon-lightsail-bucket-access-logs.md)
   + [Access log format for a bucket in the Amazon Lightsail object storage service](amazon-lightsail-bucket-access-log-format.md)
   + [Enabling access logging for a bucket in the Amazon Lightsail object storage service](amazon-lightsail-enabling-bucket-access-logs.md)
   + [Using access logs for a bucket in Amazon Lightsail to identify requests](amazon-lightsail-using-bucket-access-logs.md)

1. 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](amazon-lightsail-bucket-management-policies.md).

1. Learn about the way that objects in your bucket are labeled and identified. For more information, see [Understanding object key names in Amazon Lightsail](understanding-bucket-object-key-names-in-amazon-lightsail.md).

1. Learn how to upload files and manage objects in your buckets. For more information, see the following guides.
   + [Uploading files to a bucket in Amazon Lightsail](amazon-lightsail-uploading-files-to-a-bucket.md)
   + [Uploading files to a bucket in Amazon Lightsail using multipart upload](amazon-lightsail-uploading-files-to-a-bucket-using-multipart-upload.md)
   + [Viewing objects in a bucket in Amazon Lightsail](amazon-lightsail-viewing-objects-in-a-bucket.md)
   + [Copying or moving objects in a bucket in Amazon Lightsail](#amazon-lightsail-copying-moving-bucket-objects)
   + [Downloading objects from a bucket in Amazon Lightsail](amazon-lightsail-downloading-bucket-objects.md)
   + [Filtering objects in a bucket in Amazon Lightsail](amazon-lightsail-filtering-bucket-objects.md)
   + [Tagging objects in a bucket in Amazon Lightsail](amazon-lightsail-tagging-bucket-objects.md)
   + [Deleting objects in a bucket in Amazon Lightsail](amazon-lightsail-deleting-bucket-objects.md)

1. 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](amazon-lightsail-managing-bucket-object-versioning.md).

1. 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](amazon-lightsail-restoring-bucket-object-versions.md).

1. Monitor the utilization of your bucket. For more information, see [Viewing metrics for your bucket in Amazon Lightsail](amazon-lightsail-viewing-bucket-metrics.md).

1. 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](amazon-lightsail-adding-bucket-metric-alarms.md).

1. 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](amazon-lightsail-changing-bucket-plans.md).

1. Learn how to connect your bucket to other resources. For more information, see the following tutorials.
   + [Tutorial: Connecting a WordPress instance to an Amazon Lightsail bucket](amazon-lightsail-connecting-buckets-to-wordpress.md)
   + [Tutorial: Using an Amazon Lightsail bucket with a Lightsail content delivery network distribution](amazon-lightsail-using-distributions-with-buckets.md)

1. Delete your bucket if you're no longer using it. For more information, see [Deleting buckets in Amazon Lightsail](amazon-lightsail-deleting-buckets.md).

# Clear Lightsail bucket storage by deleting objects
Delete objects

You can delete objects from your bucket in the Amazon Lightsail object storage service. To free-up storage space, delete objects that you no longer need . For example, if you're collecting log files, it's a good idea to delete them when you don't need them anymore.

For more information about buckets, see [Object storage](buckets-in-amazon-lightsail.md).

**Contents**
+ [Delete objects from a version-enabled bucket](#deleting-objects-from-version-enabled-buckets)
+ [Delete objects using the Lightsail console](#deleting-objects-lightsail-console)
+ [Delete object versions using the Lightsail console](#deleting-object-versions-lightsail-console)
+ [Delete a single object or object version using the AWS CLI](#deleting-single-object-aws-cli)
+ [Delete multiple objects or object versions using the AWS CLI](#delete-objects-aws-cli)

## Delete objects from a version-enabled bucket


If versioning is enabled on your bucket, multiple versions of the same object can exist in it. You can delete any version of an object using the Lightsail console, AWS CLI, AWS APIs, or AWS SDKS. However, you should consider the following options.

**Delete objects and object versions using the Lightsail console**

When you delete the current version of an object in the **Objects browser pane** of the **Objects** tab in the Lightsail console, this also deletes all previous versions of the object. To delete a specific version of an object, you must do so from the **Manage versions** pane. If you use the **Manage versions** pane to delete the current version of an object, then the most recent previous version is restored as the current version. For more information, see [Delete object versions using the Lightsail console](#deleting-object-versions-lightsail-console) later in this guide.

**Delete objects and object versions using the Lightsail API, AWS CLI, or AWS SDKs**

To delete a single object and all of its stored versions, specify only the object's key in your delete request. To delete a specific version of an object, specify both the object key and also a version ID. For more information, see [Delete a single object or object version using the AWS CLI](#deleting-single-object-aws-cli) later in this guide.

## Delete objects using the Lightsail console


Complete the following procedure to delete an object, including its stored previous versions, using the Lightsail console. You can delete only one object at a time using the Lightsail console. Use the AWS CLI to delete multiple objects at once. For more information, see [Delete multiple objects or object versions using the AWS CLI](#delete-objects-aws-cli) later in this guide.

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the left navigation pane, choose **Storage**.

1. Choose the name of the bucket for which you want to delete objects.

1. Use the **Objects browser** pane in the **Objects** tab to browse to the location of the object that you want to delete.

1. Add a check mark next to the object that you want to delete.

1. In the **Object information** pane, choose the actions (⋮) menu, and then choose **Delete**.

1. In the confirmation pane that appears, confirm that you want to permanently delete the object by choosing **Yes, delete**.

   If you delete the only object in the folder that you're in, this also deletes the folder. This happens because the folder is part of the object key name, and deleting the object also deletes the preceding folders when no other objects in the bucket share the same object prefix. For more information, see [Key names for object storage buckets](understanding-bucket-object-key-names-in-amazon-lightsail.md).

## Delete object versions using the Lightsail console


Complete the following procedure to delete stored versions of an object. This is only possible for version-enabled buckets. For more information, see [Enable and suspend object versioning in a bucket](amazon-lightsail-managing-bucket-object-versioning.md).

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the left navigation pane, choose **Storage**.

1. Choose the name of the bucket for which you want to delete objects.

1. Use the **Objects browser** pane to browse to the location of the object that you want to delete.

1. Add a check mark next to the object for which you want to delete stored previous versions.

1. Choose **Manage** in the **Versions** section of the **Object information** pane, and then choose Manage.

1. In the **Manage stored object versions** pane that appears, add a check mark next to the versions of the object that you want to delete.

   You can also choose to delete the current version of an object.

1. Choose **Delete selected** to delete the selected versions.

   If you delete:
   + The current version of an object - The most recent previous version of the object is restored as the current version.
   + The only version of an object - The object is deleted from the bucket. If the version you deleted is the only object in the current folder, then the folder is deleted also. This happens because the folder is part of the object key name, and deleting the object also deletes the preceding folders when no other objects in the bucket share the same object key prefix. For more information, see [Enable and suspend object versioning in a bucket](amazon-lightsail-managing-bucket-object-versioning.md).

## Delete a single object or object version using the AWS CLI


Complete the following procedure to delete a single object or object version in your bucket using the AWS Command Line Interface (AWS CLI). You do this by using the `delete-object` command. For more information, see [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) in the *AWS CLI Command Reference*.

**Note**  
You must install the AWS CLI and configure it for Lightsail and Amazon S3 before continuing with this procedure. For more information, see [Configure the AWS Command Line Interface to work with Amazon Lightsail](lightsail-how-to-set-up-and-configure-aws-cli.md).

1. Open a Command Prompt or Terminal window.

1. Enter the following command to delete an object or an object version in your bucket.

   To delete an object:

   ```
   aws s3api delete-object --bucket BucketName --key ObjectKey
   ```

   To delete an object version:
**Note**  
Deleting object versions is only possible for version-enabled buckets. For more information, see [Enable and suspend object versioning in a bucket](amazon-lightsail-managing-bucket-object-versioning.md).

   ```
   aws s3api delete-object --bucket BucketName --key ObjectKey --version-id VersionID
   ```

   In the command, replace the following example text with your own:
   + *BucketName* - The name of the bucket from which you want to delete an object.
   + *ObjectKey* - The full object key of the object you want to delete.
   + *VersionID* - The ID of the object version you want to delete.

   Examples:

   Deleting an object:

   ```
   aws s3api delete-object --bucket amzn-s3-demo-bucket --key images/sailbot.jpg
   ```

   Deleting an object version:

   ```
   aws s3api delete-object --bucket amzn-s3-demo-bucket --key images/sailbot.jpg --version-id YF0YMBlUvexampleO07l2vJi9hRz4ujX
   ```

   You should see a result similar to the following example:  
![\[Result of the AWS CLI delete-object command\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-s3api-delete-object-version-result.png)

## Delete multiple objects or object versions using the AWS CLI


Complete the following procedure to delete multiple objects in your bucket using the AWS Command Line Interface (AWS CLI). You do this by using the `delete-objects` command. For more information, see [delete-objects](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html) in the AWS CLI Command Reference.

**Note**  
You must install the AWS CLI and configure it for Lightsail and Amazon S3 before continuing with this procedure. For more information, see [Configure the AWS Command Line Interface to work with Amazon Lightsail](lightsail-how-to-set-up-and-configure-aws-cli.md).

1. Open a Command Prompt or Terminal window.

1. Enter the following command to delete multiple objects or multiple object versions in your bucket.

   ```
   aws s3api delete-objects --bucket BucketName --delete file://LocalDirectory
   ```

   In the command, replace the following example text with your own:
   + *BucketName* - The name of the bucket from which you want to delete multiple objects or multiple object versions.
   + *LocalDirectory* - The directory path on your computer of the .json document that specifies the objects or versions to delete. The .json document can be formatted as follows.

     To delete objects, enter the following text in the .json file and replace *ObjectKey* with the object key of the objects you want to delete.

     ```
     {
       "Objects": [
         {
           "Key": "ObjectKey1"
         },
         {
           "Key": "ObjectKey2"
         }
       ],
       "Quiet": false
     }
     ```

     To delete object versions, enter the following text in the .json file. Replace *ObjectKey* and *VersionID* with the object key and IDs of the object versions that you want to delete.
**Note**  
Deleting object versions is only possible for version-enabled buckets. For more information, see [Enable and suspend object versioning in a bucket](amazon-lightsail-managing-bucket-object-versioning.md).

     ```
     {
       "Objects": [
         {
           "Key": "ObjectKey1",
           "VersionId": "VersionID1"
         },
         {
           "Key": "ObjectKey2",
           "VersionId": "VersionID2"
         }
       ],
       "Quiet": false
     }
     ```

   Examples:
   + On a Linux or Unix computer:

     ```
     aws s3api delete-objects --bucket amzn-s3-demo-bucket --delete file://home/user/Documents/delete-objects.json
     ```
   + On a Windows computer:

     ```
     aws s3api delete-objects --bucket amzn-s3-demo-bucket --delete file://C:\Users\user\Documents\delete-objects.json
     ```

   You should see a result similar to the following example:  
![\[Result of the AWS CLI delete-objects command\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-s3api-delete-objects-version-result.png)

## Manage buckets and objects


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](buckets-in-amazon-lightsail.md).

1. Learn about the names that you can give your buckets in Amazon Lightsail. For more information, see [Bucket naming rules in Amazon Lightsail](bucket-naming-rules-in-amazon-lightsail.md).

1. Get started with the Lightsail object storage service by creating a bucket. For more information, see [Creating buckets in Amazon Lightsail](amazon-lightsail-creating-buckets.md).

1. Learn about security best practices for buckets and 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 [Security Best Practices for Amazon Lightsail object storage](amazon-lightsail-bucket-security-best-practices.md) and [Understanding bucket permissions in Amazon Lightsail](amazon-lightsail-understanding-bucket-permissions.md).

   After learning about bucket access permissions, see the following guides to grant access to your bucket:
   + [Block public access for buckets in Amazon Lightsail](amazon-lightsail-block-public-access-for-buckets.md)
   + [Configuring bucket access permissions in Amazon Lightsail](amazon-lightsail-configuring-bucket-permissions.md)
   + [Configuring access permissions for individual objects in a bucket in Amazon Lightsail](amazon-lightsail-configuring-individual-object-access.md)
   + [Creating access keys for a bucket in Amazon Lightsail](amazon-lightsail-creating-bucket-access-keys.md)
   + [Configuring resource access for a bucket in Amazon Lightsail](amazon-lightsail-configuring-bucket-resource-access.md)
   + [Configuring cross-account access for a bucket in Amazon Lightsail](amazon-lightsail-configuring-bucket-cross-account-access.md)

1. Learn how to enable access logging for your bucket, and how to use access logs to audit the security of your bucket. For more information, see the following guides.
   + [Access logging for buckets in the Amazon Lightsail object storage service](amazon-lightsail-bucket-access-logs.md)
   + [Access log format for a bucket in the Amazon Lightsail object storage service](amazon-lightsail-bucket-access-log-format.md)
   + [Enabling access logging for a bucket in the Amazon Lightsail object storage service](amazon-lightsail-enabling-bucket-access-logs.md)
   + [Using access logs for a bucket in Amazon Lightsail to identify requests](amazon-lightsail-using-bucket-access-logs.md)

1. 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](amazon-lightsail-bucket-management-policies.md).

1. Learn about the way that objects in your bucket are labeled and identified. For more information, see [Understanding object key names in Amazon Lightsail](understanding-bucket-object-key-names-in-amazon-lightsail.md).

1. Learn how to upload files and manage objects in your buckets. For more information, see the following guides.
   + [Uploading files to a bucket in Amazon Lightsail](amazon-lightsail-uploading-files-to-a-bucket.md)
   + [Uploading files to a bucket in Amazon Lightsail using multipart upload](amazon-lightsail-uploading-files-to-a-bucket-using-multipart-upload.md)
   + [Viewing objects in a bucket in Amazon Lightsail](amazon-lightsail-viewing-objects-in-a-bucket.md)
   + [Copying or moving objects in a bucket in Amazon Lightsail](amazon-lightsail-copying-moving-bucket-objects.md)
   + [Downloading objects from a bucket in Amazon Lightsail](amazon-lightsail-downloading-bucket-objects.md)
   + [Filtering objects in a bucket in Amazon Lightsail](amazon-lightsail-filtering-bucket-objects.md)
   + [Tagging objects in a bucket in Amazon Lightsail](amazon-lightsail-tagging-bucket-objects.md)
   + [Deleting objects in a bucket in Amazon Lightsail](#amazon-lightsail-deleting-bucket-objects)

1. 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](amazon-lightsail-managing-bucket-object-versioning.md).

1. 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](amazon-lightsail-restoring-bucket-object-versions.md).

1. Monitor the utilization of your bucket. For more information, see [Viewing metrics for your bucket in Amazon Lightsail](amazon-lightsail-viewing-bucket-metrics.md).

1. 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](amazon-lightsail-adding-bucket-metric-alarms.md).

1. 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](amazon-lightsail-changing-bucket-plans.md).

1. Learn how to connect your bucket to other resources. For more information, see the following tutorials.
   + [Tutorial: Connecting a WordPress instance to an Amazon Lightsail bucket](amazon-lightsail-connecting-buckets-to-wordpress.md)
   + [Tutorial: Using an Amazon Lightsail bucket with a Lightsail content delivery network distribution](amazon-lightsail-using-distributions-with-buckets.md)

1. Delete your bucket if you're no longer using it. For more information, see [Deleting buckets in Amazon Lightsail](amazon-lightsail-deleting-buckets.md).

# Download objects from a Lightsail bucket
Download objects

You can download objects from buckets that you have access to or that are public (read-only) in the Amazon Lightsail object storage service. You can download a single object at a time using the Lightsail console. To download multiple objects in one request, use the AWS Command Line Interface (AWS CLI), AWS SDKs, or REST API. In this guide, we show you how to download objects using the Lightsail console and AWS CLI. For more information about buckets, see [Object storage](buckets-in-amazon-lightsail.md).

## Download objects using the Lightsail console


Complete the following procedure to download objects from a bucket using the Lightsail console.

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the left navigation pane, choose **Storage**.

1. Choose the name of the bucket from which you want to download a file.

1. In the **Objects** tab, use the **Objects browser pane** to browse to the location of the object that you want to download.

1. Add a check mark next to the object that you want to download.

1. In the **Object information** pane, choose the download icon.  
![\[Download icon for an object in a bucket\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/bucket-object-download-icon.png)

   Depending on the configuration of your browser, the file that you chose is either displayed on the page or is downloaded to your computer. If the file is displayed on the page, you can right-click it and choose **Save as** to save it to your computer.

## Download objects using the AWS CLI


Complete the following procedure to download objects from a bucket using the AWS Command Line Interface (AWS CLI). You do this by using the `get-object` command. For more information, see [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html) in the *AWS CLI Command Reference*.

**Note**  
You must install the AWS CLI and configure it for Lightsail and Amazon S3 before continuing with this procedure. For more information, see [Configure the AWS Command Line Interface to work with Amazon Lightsail](lightsail-how-to-set-up-and-configure-aws-cli.md).

1. Open a Command Prompt or Terminal window.

1. Enter the following command to download an object from your bucket.

   ```
   aws s3api get-object --bucket BucketName --key ObjectKey LocalFilePath
   ```

   In the command, replace the following example text with your own:
   + *BucketName* - The name of the bucket from which you want to download an object.
   + *ObjectKey* - The full object key of the object you want to download.
   + *LocalFilePath* - The full file path on your computer where you want to save the downloaded file.

   Example:

   ```
   aws s3api get-object --bucket amzn-s3-demo-bucket --key images/sailbot.jpg C:\Users\user\Pictures\sailbot.jpg
   ```

   You should see a result similar to the following example:  
![\[Result of the AWS CLI download-object command\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-s3api-download-object-result.png)

## Manage buckets and objects


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](buckets-in-amazon-lightsail.md).

1. Learn about the names that you can give your buckets in Amazon Lightsail. For more information, see [Bucket naming rules in Amazon Lightsail](bucket-naming-rules-in-amazon-lightsail.md).

1. Get started with the Lightsail object storage service by creating a bucket. For more information, see [Creating buckets in Amazon Lightsail](amazon-lightsail-creating-buckets.md).

1. Learn about security best practices for buckets and 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 [Security Best Practices for Amazon Lightsail object storage](amazon-lightsail-bucket-security-best-practices.md) and [Understanding bucket permissions in Amazon Lightsail](amazon-lightsail-understanding-bucket-permissions.md).

   After learning about bucket access permissions, see the following guides to grant access to your bucket:
   + [Block public access for buckets in Amazon Lightsail](amazon-lightsail-block-public-access-for-buckets.md)
   + [Configuring bucket access permissions in Amazon Lightsail](amazon-lightsail-configuring-bucket-permissions.md)
   + [Configuring access permissions for individual objects in a bucket in Amazon Lightsail](amazon-lightsail-configuring-individual-object-access.md)
   + [Creating access keys for a bucket in Amazon Lightsail](amazon-lightsail-creating-bucket-access-keys.md)
   + [Configuring resource access for a bucket in Amazon Lightsail](amazon-lightsail-configuring-bucket-resource-access.md)
   + [Configuring cross-account access for a bucket in Amazon Lightsail](amazon-lightsail-configuring-bucket-cross-account-access.md)

1. Learn how to enable access logging for your bucket, and how to use access logs to audit the security of your bucket. For more information, see the following guides.
   + [Access logging for buckets in the Amazon Lightsail object storage service](amazon-lightsail-bucket-access-logs.md)
   + [Access log format for a bucket in the Amazon Lightsail object storage service](amazon-lightsail-bucket-access-log-format.md)
   + [Enabling access logging for a bucket in the Amazon Lightsail object storage service](amazon-lightsail-enabling-bucket-access-logs.md)
   + [Using access logs for a bucket in Amazon Lightsail to identify requests](amazon-lightsail-using-bucket-access-logs.md)

1. 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](amazon-lightsail-bucket-management-policies.md).

1. Learn about the way that objects in your bucket are labeled and identified. For more information, see [Understanding object key names in Amazon Lightsail](understanding-bucket-object-key-names-in-amazon-lightsail.md).

1. Learn how to upload files and manage objects in your buckets. For more information, see the following guides.
   + [Uploading files to a bucket in Amazon Lightsail](amazon-lightsail-uploading-files-to-a-bucket.md)
   + [Uploading files to a bucket in Amazon Lightsail using multipart upload](amazon-lightsail-uploading-files-to-a-bucket-using-multipart-upload.md)
   + [Viewing objects in a bucket in Amazon Lightsail](amazon-lightsail-viewing-objects-in-a-bucket.md)
   + [Copying or moving objects in a bucket in Amazon Lightsail](amazon-lightsail-copying-moving-bucket-objects.md)
   + [Downloading objects from a bucket in Amazon Lightsail](#amazon-lightsail-downloading-bucket-objects)
   + [Filtering objects in a bucket in Amazon Lightsail](amazon-lightsail-filtering-bucket-objects.md)
   + [Tagging objects in a bucket in Amazon Lightsail](amazon-lightsail-tagging-bucket-objects.md)
   + [Deleting objects in a bucket in Amazon Lightsail](amazon-lightsail-deleting-bucket-objects.md)

1. 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](amazon-lightsail-managing-bucket-object-versioning.md).

1. 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](amazon-lightsail-restoring-bucket-object-versions.md).

1. Monitor the utilization of your bucket. For more information, see [Viewing metrics for your bucket in Amazon Lightsail](amazon-lightsail-viewing-bucket-metrics.md).

1. 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](amazon-lightsail-adding-bucket-metric-alarms.md).

1. 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](amazon-lightsail-changing-bucket-plans.md).

1. Learn how to connect your bucket to other resources. For more information, see the following tutorials.
   + [Tutorial: Connecting a WordPress instance to an Amazon Lightsail bucket](amazon-lightsail-connecting-buckets-to-wordpress.md)
   + [Tutorial: Using an Amazon Lightsail bucket with a Lightsail content delivery network distribution](amazon-lightsail-using-distributions-with-buckets.md)

1. Delete your bucket if you're no longer using it. For more information, see [Deleting buckets in Amazon Lightsail](amazon-lightsail-deleting-buckets.md).

# Filter objects in Lightsail buckets by name prefix
Filter objects

You can use filtering to find objects in your bucket in the Amazon Lightsail object storage service. In this guide, we show you how to filter objects using the Lightsail console, and the AWS Command Line Interface (AWS CLI). For more information about buckets, see [Object storage](buckets-in-amazon-lightsail.md).

## Filter objects using the Lightsail console


Complete the following procedure to filter objects in a bucket using the Lightsail console.

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the left navigation pane, choose **Storage**.

1. Choose the name of the bucket for which you want to find objects.

1. In the **Objects** tab, type an object prefix in the **Filter by name** text box.

   The list of objects in the folder that you're currently viewing are filtered to match the text you enter. The following example shows that if you enter `sail`, the list of objects on the page are filtered to display only those that start with `sail`.  
![\[Filtering bucket objects in the Lightsail console\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-filter-bucket-objects-using-console.png)

   To filter the list of objects in a different folder, navigate to that folder. Then, enter the object prefix into the **Filter by name** text box there.

## Filter objects using the AWS CLI


Complete the following procedure to filter objects in a bucket using the AWS Command Line Interface (AWS CLI). You do this by using the `list-objects-v2` command. For more information, see [list-objects-v2](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-objects-v2.html) in the *AWS CLI Command Reference*.

**Note**  
You must install the AWS CLI and configure it for Lightsail and Amazon S3 before continuing with this procedure. For more information, see [Configure the AWS Command Line Interface to work with Amazon Lightsail](lightsail-how-to-set-up-and-configure-aws-cli.md).

1. Open a Command Prompt or Terminal window.

1. Enter the following command to list objects that start with a specific object key name prefix.

   ```
   aws s3api list-objects-v2 --bucket BucketName --prefix ObjectKeyNamePrefix --query "Contents[].{Key: Key, Size: Size}"
   ```

   In the command, replace the following example text with your own:
   + *BucketName* - The name of the bucket for which you want to list all objects.
   + *ObjectKeyNamePrefix* - An object key name prefix to limit the response to keys that begin with the specified prefix.
**Note**  
This command uses the `--query` parameter to filter the response of the `list-objects-v2` request to the key value and size of each object.

   Example:

   ```
   aws s3api list-objects-v2 --bucket amzn-s3-demo-bucket --prefix archived/ --query "Contents[].{Key: Key, Size: Size}"
   ```

   You should see a result similar to the following example.  
![\[Result of the AWS CLI list-objects-v2 command\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-s3api-list-objects-v2-prefix-result.png)

## Manage buckets and objects


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](buckets-in-amazon-lightsail.md).

1. Learn about the names that you can give your buckets in Amazon Lightsail. For more information, see [Bucket naming rules in Amazon Lightsail](bucket-naming-rules-in-amazon-lightsail.md).

1. Get started with the Lightsail object storage service by creating a bucket. For more information, see [Creating buckets in Amazon Lightsail](amazon-lightsail-creating-buckets.md).

1. Learn about security best practices for buckets and 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 [Security Best Practices for Amazon Lightsail object storage](amazon-lightsail-bucket-security-best-practices.md) and [Understanding bucket permissions in Amazon Lightsail](amazon-lightsail-understanding-bucket-permissions.md).

   After learning about bucket access permissions, see the following guides to grant access to your bucket:
   + [Block public access for buckets in Amazon Lightsail](amazon-lightsail-block-public-access-for-buckets.md)
   + [Configuring bucket access permissions in Amazon Lightsail](amazon-lightsail-configuring-bucket-permissions.md)
   + [Configuring access permissions for individual objects in a bucket in Amazon Lightsail](amazon-lightsail-configuring-individual-object-access.md)
   + [Creating access keys for a bucket in Amazon Lightsail](amazon-lightsail-creating-bucket-access-keys.md)
   + [Configuring resource access for a bucket in Amazon Lightsail](amazon-lightsail-configuring-bucket-resource-access.md)
   + [Configuring cross-account access for a bucket in Amazon Lightsail](amazon-lightsail-configuring-bucket-cross-account-access.md)

1. Learn how to enable access logging for your bucket, and how to use access logs to audit the security of your bucket. For more information, see the following guides.
   + [Access logging for buckets in the Amazon Lightsail object storage service](amazon-lightsail-bucket-access-logs.md)
   + [Access log format for a bucket in the Amazon Lightsail object storage service](amazon-lightsail-bucket-access-log-format.md)
   + [Enabling access logging for a bucket in the Amazon Lightsail object storage service](amazon-lightsail-enabling-bucket-access-logs.md)
   + [Using access logs for a bucket in Amazon Lightsail to identify requests](amazon-lightsail-using-bucket-access-logs.md)

1. 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](amazon-lightsail-bucket-management-policies.md).

1. Learn about the way that objects in your bucket are labeled and identified. For more information, see [Understanding object key names in Amazon Lightsail](understanding-bucket-object-key-names-in-amazon-lightsail.md).

1. Learn how to upload files and manage objects in your buckets. For more information, see the following guides.
   + [Uploading files to a bucket in Amazon Lightsail](amazon-lightsail-uploading-files-to-a-bucket.md)
   + [Uploading files to a bucket in Amazon Lightsail using multipart upload](amazon-lightsail-uploading-files-to-a-bucket-using-multipart-upload.md)
   + [Viewing objects in a bucket in Amazon Lightsail](amazon-lightsail-viewing-objects-in-a-bucket.md)
   + [Copying or moving objects in a bucket in Amazon Lightsail](amazon-lightsail-copying-moving-bucket-objects.md)
   + [Downloading objects from a bucket in Amazon Lightsail](amazon-lightsail-downloading-bucket-objects.md)
   + [Filtering objects in a bucket in Amazon Lightsail](#amazon-lightsail-filtering-bucket-objects)
   + [Tagging objects in a bucket in Amazon Lightsail](amazon-lightsail-tagging-bucket-objects.md)
   + [Deleting objects in a bucket in Amazon Lightsail](amazon-lightsail-deleting-bucket-objects.md)

1. 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](amazon-lightsail-managing-bucket-object-versioning.md).

1. 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](amazon-lightsail-restoring-bucket-object-versions.md).

1. Monitor the utilization of your bucket. For more information, see [Viewing metrics for your bucket in Amazon Lightsail](amazon-lightsail-viewing-bucket-metrics.md).

1. 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](amazon-lightsail-adding-bucket-metric-alarms.md).

1. 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](amazon-lightsail-changing-bucket-plans.md).

1. Learn how to connect your bucket to other resources. For more information, see the following tutorials.
   + [Tutorial: Connecting a WordPress instance to an Amazon Lightsail bucket](amazon-lightsail-connecting-buckets-to-wordpress.md)
   + [Tutorial: Using an Amazon Lightsail bucket with a Lightsail content delivery network distribution](amazon-lightsail-using-distributions-with-buckets.md)

1. Delete your bucket if you're no longer using it. For more information, see [Deleting buckets in Amazon Lightsail](amazon-lightsail-deleting-buckets.md).

# Enable and suspend object versioning in Lightsail
Manage object versioning

Versioning in Amazon Lightsail object storage service is a means of keeping multiple variants of an object in the same bucket. You can use the versioning feature to preserve, retrieve, and restore every version of every object stored in your buckets. With versioning, you can recover more easily from both unintended user actions and application failures. When you enable versioning for a bucket, if the Lightsail object storage service receives multiple write requests for the same object simultaneously, it stores all of those objects. Versioning is disabled by default on buckets in the Lightsail object storage service, so you must explicitly enable it. For more information about buckets, see [Object storage](buckets-in-amazon-lightsail.md).

**Important**  
When you enable or suspend versioning on a bucket that has the **Individual objects can be made public (read-only)** access permission configured, the permission resets to **All objects are private**. If you want to continue having the option to make individual objects public, you must manually change the bucket access permission back to **Individual objects can be made public (read-only)**. For more information, see [Configure bucket access permissions](amazon-lightsail-configuring-bucket-permissions.md).

## Version disabled, enabled, and suspended buckets


Bucket versioning can be in one of three states in the Lightsail console:
+ Disabled (`NeverEnabled` in the API and SDKs)
+ Enabled (`Enabled` in the API and SDKs)
+ Suspended (`Suspended` in the API and SDKs)

After you enable versioning in a bucket, it cannot return to a disabled state. But you can suspend versioning. You enable and suspend versioning at the bucket level.

The versioning state applies to all (not some) of the objects in that bucket. When you enable versioning in a bucket, all new objects are versioned and given a unique version ID. Objects that already exist in the bucket when versioning is enabled are always versioned going forward. They are given a unique version ID when they are modified by future requests.

## Version IDs


If you enable versioning for a bucket, the Lightsail object storage service automatically generates a unique version ID for the object that is being stored. For example, in one bucket you can have two objects with the same key but different version IDs, such as `photo.gif` (version 111111) and `photo.gif` (version 121212).

![\[Bucket versioning enabled\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-bucket-versioning-versioning-enabled.png)


Version IDs cannot be edited. They are Unicode, UTF-8 encoded, URL-ready, opaque strings that are no more than 1,024 bytes long. The following is an example of a version ID:

```
3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo
```

## Enable or suspend object versioning using the Lightsail console


Complete the following procedure to enable or suspend object versioning using the Lightsail console.

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the left navigation pane, choose **Storage**.

1. Choose the name of the bucket for which you want to enable or suspend versioning.

1. Choose the Versioning tab.

1. Complete one of the following actions depending on the current versioning state of your bucket:
   + If versioning is currently suspended or has not been enabled, choose the toggle under the **Object versioning** section of the page to enable versioning.
   + If versioning is currently enabled, choose the toggle under the **Object versioning** section of the page to suspend versioning.

## Enable or suspend object versioning using the AWS CLI


Complete the following procedure to enable or suspend object versioning using the AWS Command Line Interface (AWS CLI). You do this by using the `update-bucket` command. For more information, see [update-bucket](https://docs.aws.amazon.com/cli/latest/reference/lightsail/update-bucket.html) in the *AWS CLI Command Reference*.

**Note**  
You must install the AWS CLI and configure it for Lightsail and Amazon S3 before continuing with this procedure. For more information, see [Configure the AWS CLI to work with Lightsail](lightsail-how-to-set-up-and-configure-aws-cli.md).

1. Open a Command Prompt or Terminal window.

1. Enter the following command to enable or suspend object versioning.

   ```
   aws lightsail update-bucket --bucket-name BucketName --versioning VersioningState
   ```

   In the command, replace the following example text with your own:
   + *BucketName* - The name of the bucket for which you want to enable object versioning.
   + *VersioningState* - One of the following:
     + `Enabled` - Enables object versioning.
     + `Suspended` - Suspends object versioning if it was previously enabled.

   Example:

   ```
   aws lightsail update-bucket --bucket-name amzn-s3-demo-bucket --versioning Enabled
   ```

   You should see a result similar to the following example:  
![\[Response to the update bucket request\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-update-bucket-objects-versioning-cli.png)

## Manage buckets and objects


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](buckets-in-amazon-lightsail.md).

1. Learn about the names that you can give your buckets in Amazon Lightsail. For more information, see [Bucket naming rules in Amazon Lightsail](bucket-naming-rules-in-amazon-lightsail.md).

1. Get started with the Lightsail object storage service by creating a bucket. For more information, see [Creating buckets in Amazon Lightsail](amazon-lightsail-creating-buckets.md).

1. Learn about security best practices for buckets and 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 [Security Best Practices for Amazon Lightsail object storage](amazon-lightsail-bucket-security-best-practices.md) and [Understanding bucket permissions in Amazon Lightsail](amazon-lightsail-understanding-bucket-permissions.md).

   After learning about bucket access permissions, see the following guides to grant access to your bucket:
   + [Block public access for buckets in Amazon Lightsail](amazon-lightsail-block-public-access-for-buckets.md)
   + [Configuring bucket access permissions in Amazon Lightsail](amazon-lightsail-configuring-bucket-permissions.md)
   + [Configuring access permissions for individual objects in a bucket in Amazon Lightsail](amazon-lightsail-configuring-individual-object-access.md)
   + [Creating access keys for a bucket in Amazon Lightsail](amazon-lightsail-creating-bucket-access-keys.md)
   + [Configuring resource access for a bucket in Amazon Lightsail](amazon-lightsail-configuring-bucket-resource-access.md)
   + [Configuring cross-account access for a bucket in Amazon Lightsail](amazon-lightsail-configuring-bucket-cross-account-access.md)

1. Learn how to enable access logging for your bucket, and how to use access logs to audit the security of your bucket. For more information, see the following guides.
   + [Access logging for buckets in the Amazon Lightsail object storage service](amazon-lightsail-bucket-access-logs.md)
   + [Access log format for a bucket in the Amazon Lightsail object storage service](amazon-lightsail-bucket-access-log-format.md)
   + [Enabling access logging for a bucket in the Amazon Lightsail object storage service](amazon-lightsail-enabling-bucket-access-logs.md)
   + [Using access logs for a bucket in Amazon Lightsail to identify requests](amazon-lightsail-using-bucket-access-logs.md)

1. 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](amazon-lightsail-bucket-management-policies.md).

1. Learn about the way that objects in your bucket are labeled and identified. For more information, see [Understanding object key names in Amazon Lightsail](understanding-bucket-object-key-names-in-amazon-lightsail.md).

1. Learn how to upload files and manage objects in your buckets. For more information, see the following guides.
   + [Uploading files to a bucket in Amazon Lightsail](amazon-lightsail-uploading-files-to-a-bucket.md)
   + [Uploading files to a bucket in Amazon Lightsail using multipart upload](amazon-lightsail-uploading-files-to-a-bucket-using-multipart-upload.md)
   + [Viewing objects in a bucket in Amazon Lightsail](amazon-lightsail-viewing-objects-in-a-bucket.md)
   + [Copying or moving objects in a bucket in Amazon Lightsail](amazon-lightsail-copying-moving-bucket-objects.md)
   + [Downloading objects from a bucket in Amazon Lightsail](amazon-lightsail-downloading-bucket-objects.md)
   + [Filtering objects in a bucket in Amazon Lightsail](amazon-lightsail-filtering-bucket-objects.md)
   + [Tagging objects in a bucket in Amazon Lightsail](amazon-lightsail-tagging-bucket-objects.md)
   + [Deleting objects in a bucket in Amazon Lightsail](amazon-lightsail-deleting-bucket-objects.md)

1. 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](#amazon-lightsail-managing-bucket-object-versioning).

1. 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](amazon-lightsail-restoring-bucket-object-versions.md).

1. Monitor the utilization of your bucket. For more information, see [Viewing metrics for your bucket in Amazon Lightsail](amazon-lightsail-viewing-bucket-metrics.md).

1. 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](amazon-lightsail-adding-bucket-metric-alarms.md).

1. 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](amazon-lightsail-changing-bucket-plans.md).

1. Learn how to connect your bucket to other resources. For more information, see the following tutorials.
   + [Tutorial: Connecting a WordPress instance to an Amazon Lightsail bucket](amazon-lightsail-connecting-buckets-to-wordpress.md)
   + [Tutorial: Using an Amazon Lightsail bucket with a Lightsail content delivery network distribution](amazon-lightsail-using-distributions-with-buckets.md)

1. Delete your bucket if you're no longer using it. For more information, see [Deleting buckets in Amazon Lightsail](amazon-lightsail-deleting-buckets.md).

# Recover previous object versions in Lightsail buckets
Restore object versions

If your bucket in the Amazon Lightsail object storage service is version-enabled, then you can restore previous versions of an object. Restore a previous version of an object recover from unintended user actions or application failures.

You can restore a previous version of an object using the Lightsail console. You can also use the AWS Command Line Interface (AWS CLI) and AWS SDKs restore a previous version of an object. To do this, copy a specific version of the object into the same bucket, and use the same object key name. This replaces the current version with the previous version, making the previous version the current version. For more information about versioning, see [Enable and suspend bucket object versioning](amazon-lightsail-managing-bucket-object-versioning.md). For more information about buckets, see [Object storage](buckets-in-amazon-lightsail.md).

## Restore a previous version of an object using the Lightsail console


Complete the following procedure to restore a previous version of an object using the Lightsail console.

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the left navigation pane, choose **Storage**.

1. Choose the name of the bucket for which you want to restore a previous version of an object.

1. Use the **Objects browser** pane in the **Objects** tab to browse to the location of the object.

1. Add a check mark next to the object for which you want to restore a previous version.

1. Choose **Manage** under the Versions section of the **Object information** pane.

1. Choose **Restore**.

1. In the **Restore object** from a stored version pane that appears, choose the version of the object that you want to restore.

1. Choose **Continue**.

1. In the confirmation prompt that appears, choose **Yes, restore** to restore the object version. Otherwise, choose **No, cancel**.

## Restore a previous version of an object using the AWS CLI


Complete the following procedure to restore a previous version of an object the AWS Command Line Interface (AWS CLI). You do this by using the `copy-object` command. You must copy the previous version of the object into the same bucket, using the same object key. For more information, see [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) in the *AWS CLI Command Reference*.

**Note**  
You must install the AWS CLI and configure it for Lightsail and Amazon S3 before continuing with this procedure. For more information, see [Configure the AWS Command Line Interface to work with Amazon Lightsail](lightsail-how-to-set-up-and-configure-aws-cli.md).

1. Open a Command Prompt or Terminal window.

1. Enter the following command to restore a previous version of an object.

   ```
   aws s3api copy-object --copy-source "BucketName/ObjectKey?versionId=VersionId" --key ObjectKey --bucket BucketName
   ```

   In the command, replace the following example text with your own:
   + *BucketName* - The name of the bucket for which you want to restore a previous version of an object. You must specify the same bucket name for the `--copy-source` and `--bucket` parameters.
   + *ObjectKey* - The name of the object to restore. You must specify the same object key name for the `--copy-source` and `--key` parameters.
   + *VersionId* - The ID of the previous object version that you want to restore to the current version. Use the `list-object-versions` command to get a list of version IDs for objects in your bucket.

   Example:

   ```
   aws s3api copy-object --copy-source "amzn-s3-demo-bucket/sailbot.jpg?versionId=GQWEexample87Mdl8Q_DKdVTiVMi_VyU" –key sailbot.jpg --bucket amzn-s3-demo-bucket
   ```

   You should see a result similar to the following example:  
![\[Result of the AWS CLI copy-object-version command\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-s3api-copy-object-version-result.png)

## Manage buckets and objects


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](buckets-in-amazon-lightsail.md).

1. Learn about the names that you can give your buckets in Amazon Lightsail. For more information, see [Bucket naming rules in Amazon Lightsail](bucket-naming-rules-in-amazon-lightsail.md).

1. Get started with the Lightsail object storage service by creating a bucket. For more information, see [Creating buckets in Amazon Lightsail](amazon-lightsail-creating-buckets.md).

1. Learn about security best practices for buckets and 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 [Security Best Practices for Amazon Lightsail object storage](amazon-lightsail-bucket-security-best-practices.md) and [Understanding bucket permissions in Amazon Lightsail](amazon-lightsail-understanding-bucket-permissions.md).

   After learning about bucket access permissions, see the following guides to grant access to your bucket:
   + [Block public access for buckets in Amazon Lightsail](amazon-lightsail-block-public-access-for-buckets.md)
   + [Configuring bucket access permissions in Amazon Lightsail](amazon-lightsail-configuring-bucket-permissions.md)
   + [Configuring access permissions for individual objects in a bucket in Amazon Lightsail](amazon-lightsail-configuring-individual-object-access.md)
   + [Creating access keys for a bucket in Amazon Lightsail](amazon-lightsail-creating-bucket-access-keys.md)
   + [Configuring resource access for a bucket in Amazon Lightsail](amazon-lightsail-configuring-bucket-resource-access.md)
   + [Configuring cross-account access for a bucket in Amazon Lightsail](amazon-lightsail-configuring-bucket-cross-account-access.md)

1. Learn how to enable access logging for your bucket, and how to use access logs to audit the security of your bucket. For more information, see the following guides.
   + [Access logging for buckets in the Amazon Lightsail object storage service](amazon-lightsail-bucket-access-logs.md)
   + [Access log format for a bucket in the Amazon Lightsail object storage service](amazon-lightsail-bucket-access-log-format.md)
   + [Enabling access logging for a bucket in the Amazon Lightsail object storage service](amazon-lightsail-enabling-bucket-access-logs.md)
   + [Using access logs for a bucket in Amazon Lightsail to identify requests](amazon-lightsail-using-bucket-access-logs.md)

1. 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](amazon-lightsail-bucket-management-policies.md).

1. Learn about the way that objects in your bucket are labeled and identified. For more information, see [Understanding object key names in Amazon Lightsail](understanding-bucket-object-key-names-in-amazon-lightsail.md).

1. Learn how to upload files and manage objects in your buckets. For more information, see the following guides.
   + [Uploading files to a bucket in Amazon Lightsail](amazon-lightsail-uploading-files-to-a-bucket.md)
   + [Uploading files to a bucket in Amazon Lightsail using multipart upload](amazon-lightsail-uploading-files-to-a-bucket-using-multipart-upload.md)
   + [Viewing objects in a bucket in Amazon Lightsail](amazon-lightsail-viewing-objects-in-a-bucket.md)
   + [Copying or moving objects in a bucket in Amazon Lightsail](amazon-lightsail-copying-moving-bucket-objects.md)
   + [Downloading objects from a bucket in Amazon Lightsail](amazon-lightsail-downloading-bucket-objects.md)
   + [Filtering objects in a bucket in Amazon Lightsail](amazon-lightsail-filtering-bucket-objects.md)
   + [Tagging objects in a bucket in Amazon Lightsail](amazon-lightsail-tagging-bucket-objects.md)
   + [Deleting objects in a bucket in Amazon Lightsail](amazon-lightsail-deleting-bucket-objects.md)

1. 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](amazon-lightsail-managing-bucket-object-versioning.md).

1. 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](#amazon-lightsail-restoring-bucket-object-versions).

1. Monitor the utilization of your bucket. For more information, see [Viewing metrics for your bucket in Amazon Lightsail](amazon-lightsail-viewing-bucket-metrics.md).

1. 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](amazon-lightsail-adding-bucket-metric-alarms.md).

1. 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](amazon-lightsail-changing-bucket-plans.md).

1. Learn how to connect your bucket to other resources. For more information, see the following tutorials.
   + [Tutorial: Connecting a WordPress instance to an Amazon Lightsail bucket](amazon-lightsail-connecting-buckets-to-wordpress.md)
   + [Tutorial: Using an Amazon Lightsail bucket with a Lightsail content delivery network distribution](amazon-lightsail-using-distributions-with-buckets.md)

1. Delete your bucket if you're no longer using it. For more information, see [Deleting buckets in Amazon Lightsail](amazon-lightsail-deleting-buckets.md).

# Tag objects in Lightsail buckets
Tag objects

Tag objects in your bucket to categorize them by purpose, owner, environment, or other criteria. Tags can be added to objects when you upload them, or after they are uploaded. For more information about buckets, see [Object storage](buckets-in-amazon-lightsail.md).

## Add and delete tags for objects using the Lightsail console


Complete the following procedure to add or delete tags from objects in a bucket using the Lightsail console.

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the left navigation pane, choose **Storage**.

1. Choose the name of the bucket for which you want to tag objects.

1. Use the **Objects browser** pane in the **Objects** tab to browse to the location of the object.

1. Add a check mark next to the object for which you want to add or delete a tag.

1. In the object information pane, choose one of the following options under the **Object tags** section:
   + **Add** or **Edit** (if tags have already been added). Enter a key into the Key text box, and a value into the **Value** text box. Then, choose **Save** to add the tag. Otherwise, choose **Cancel**.
   + **Edit**, and then choose the **X** next to the key-value tag that you want to delete. Choose **Save** when you're done to delete the tag, or choose **Cancel** to not delete it.

## Add and delete tags for objects using the AWS CLI


Complete the following procedure to add tags to objects or delete tags from objects using the AWS Command Line Interface (AWS CLI). You do this by using the `put-object-tagging` and `delete-object-tagging` commands. For more information, see [put-object-tagging](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object-tagging.html) and [delete-object-tagging](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object-tagging.html) in the *AWS CLI Command Reference*.

**Note**  
You must install the AWS CLI and configure it for Lightsail and Amazon S3 before continuing with this procedure. For more information, see [Configure the AWS CLI to work with Lightsail](lightsail-how-to-set-up-and-configure-aws-cli.md).

1. Open a Command Prompt or Terminal window.

1. Enter one of the following commands:
   + To add a tag to an object:

     ```
     aws s3api put-object-tagging --bucket BucketName --key ObjectKey --tagging "{\"TagSet\":[{ \"Key\": \"KeyTag\", \"Value\": \"ValueTag\" }]}"
     ```

     In the command, replace the following example text with your own:
     + *BucketName* - The name of the bucket that contains the object you want to tag.
     + *ObjectKey* - The full object key of the object you want to tag.
     + *KeyTag* - The key value of your tag.
     + *ValueTag* - The value of your tag.
   + To add a tag to an object:

     ```
     aws s3api put-object-tagging --bucket BucketName --key ObjectKey --tagging "{\"TagSet\":[{ \"Key\": \"KeyTag1\", \"Value\": \"ValueTag1\" }, { \"Key\": \"KeyTag2\", \"Value\": \"ValueTag2\" }]}"
     ```

     In the command, replace the following example text with your own:
     + *BucketName* - The name of the bucket that contains the object you want to tag.
     + *ObjectKey* - The full object key of the object you want to tag.
     + *KeyTag1* - The key value of your first tag.
     + *ValueTag1* - The value of your first tag.
     + *KeyTag2* - The key value of your second tag.
     + *ValueTag2* - The value of your second tag.
   + To delete all tags from an object:

     ```
     aws s3api delete-object-tagging --bucket BucketName --key ObjectKey
     ```

     In the command, replace the following example text with your own:
     + *BucketName* - The name of the bucket that contains the object for which you want to delete all tags.
     + *ObjectKey* - The full object key of the object you want to tag.

   Example:

   ```
   aws s3api delete-object --bucket amzn-s3-demo-bucket --key nptLmg6jqDo.jpg --tagging "{\"TagSet\":[{ \"Key\": \"Importance\", \"Value\": \"High\" }]}"
   ```

   You should see a result similar to the following example:  
![\[Result of the AWS CLI put-object-tagging command\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-s3api-put-object-tagging-result.png)

## Manage buckets and objects


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](buckets-in-amazon-lightsail.md).

1. Learn about the names that you can give your buckets in Amazon Lightsail. For more information, see [Bucket naming rules in Amazon Lightsail](bucket-naming-rules-in-amazon-lightsail.md).

1. Get started with the Lightsail object storage service by creating a bucket. For more information, see [Creating buckets in Amazon Lightsail](amazon-lightsail-creating-buckets.md).

1. Learn about security best practices for buckets and 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 [Security Best Practices for Amazon Lightsail object storage](amazon-lightsail-bucket-security-best-practices.md) and [Understanding bucket permissions in Amazon Lightsail](amazon-lightsail-understanding-bucket-permissions.md).

   After learning about bucket access permissions, see the following guides to grant access to your bucket:
   + [Block public access for buckets in Amazon Lightsail](amazon-lightsail-block-public-access-for-buckets.md)
   + [Configuring bucket access permissions in Amazon Lightsail](amazon-lightsail-configuring-bucket-permissions.md)
   + [Configuring access permissions for individual objects in a bucket in Amazon Lightsail](amazon-lightsail-configuring-individual-object-access.md)
   + [Creating access keys for a bucket in Amazon Lightsail](amazon-lightsail-creating-bucket-access-keys.md)
   + [Configuring resource access for a bucket in Amazon Lightsail](amazon-lightsail-configuring-bucket-resource-access.md)
   + [Configuring cross-account access for a bucket in Amazon Lightsail](amazon-lightsail-configuring-bucket-cross-account-access.md)

1. Learn how to enable access logging for your bucket, and how to use access logs to audit the security of your bucket. For more information, see the following guides.
   + [Access logging for buckets in the Amazon Lightsail object storage service](amazon-lightsail-bucket-access-logs.md)
   + [Access log format for a bucket in the Amazon Lightsail object storage service](amazon-lightsail-bucket-access-log-format.md)
   + [Enabling access logging for a bucket in the Amazon Lightsail object storage service](amazon-lightsail-enabling-bucket-access-logs.md)
   + [Using access logs for a bucket in Amazon Lightsail to identify requests](amazon-lightsail-using-bucket-access-logs.md)

1. 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](amazon-lightsail-bucket-management-policies.md).

1. Learn about the way that objects in your bucket are labeled and identified. For more information, see [Understanding object key names in Amazon Lightsail](understanding-bucket-object-key-names-in-amazon-lightsail.md).

1. Learn how to upload files and manage objects in your buckets. For more information, see the following guides.
   + [Uploading files to a bucket in Amazon Lightsail](amazon-lightsail-uploading-files-to-a-bucket.md)
   + [Uploading files to a bucket in Amazon Lightsail using multipart upload](amazon-lightsail-uploading-files-to-a-bucket-using-multipart-upload.md)
   + [Viewing objects in a bucket in Amazon Lightsail](amazon-lightsail-viewing-objects-in-a-bucket.md)
   + [Copying or moving objects in a bucket in Amazon Lightsail](amazon-lightsail-copying-moving-bucket-objects.md)
   + [Downloading objects from a bucket in Amazon Lightsail](amazon-lightsail-downloading-bucket-objects.md)
   + [Filtering objects in a bucket in Amazon Lightsail](amazon-lightsail-filtering-bucket-objects.md)
   + [Tagging objects in a bucket in Amazon Lightsail](#amazon-lightsail-tagging-bucket-objects)
   + [Deleting objects in a bucket in Amazon Lightsail](amazon-lightsail-deleting-bucket-objects.md)

1. 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](amazon-lightsail-managing-bucket-object-versioning.md).

1. 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](amazon-lightsail-restoring-bucket-object-versions.md).

1. Monitor the utilization of your bucket. For more information, see [Viewing metrics for your bucket in Amazon Lightsail](amazon-lightsail-viewing-bucket-metrics.md).

1. 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](amazon-lightsail-adding-bucket-metric-alarms.md).

1. 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](amazon-lightsail-changing-bucket-plans.md).

1. Learn how to connect your bucket to other resources. For more information, see the following tutorials.
   + [Tutorial: Connecting a WordPress instance to an Amazon Lightsail bucket](amazon-lightsail-connecting-buckets-to-wordpress.md)
   + [Tutorial: Using an Amazon Lightsail bucket with a Lightsail content delivery network distribution](amazon-lightsail-using-distributions-with-buckets.md)

1. Delete your bucket if you're no longer using it. For more information, see [Deleting buckets in Amazon Lightsail](amazon-lightsail-deleting-buckets.md).