Viewing the properties for an S3 bucket - Amazon Simple Storage Service

Viewing the properties for an S3 bucket

You can view properties for any Amazon S3 bucket you own. These settings include the following:

  • Bucket Versioning – Keep multiple versions of an object in one bucket by using versioning. By default, versioning is disabled for a new bucket. For information about enabling versioning, see Enabling versioning on buckets.

  • Tags – With AWS cost allocation, you can use bucket tags to annotate billing for your use of a bucket. A tag is a key-value pair that represents a label that you assign to a bucket. For more information, see Using cost allocation S3 bucket tags.

  • Default encryption – Enabling default encryption provides you with automatic server-side encryption. Amazon S3 encrypts an object before saving it to a disk and decrypts the object when you download it. For more information, see Setting default server-side encryption behavior for Amazon S3 buckets.

  • Server access logging – Get detailed records for the requests that are made to your bucket with server access logging. By default, Amazon S3 doesn't collect server access logs. For information about enabling server access logging, see Enabling Amazon S3 server access logging.

  • AWS CloudTrail data events – Use CloudTrail to log data events. By default, trails don't log data events. Additional charges apply for data events. For more information, see Logging Data Events for Trails in the AWS CloudTrail User Guide.

  • Event notifications – Enable certain Amazon S3 bucket events to send notification messages to a destination whenever the events occur. For more information, see Enabling and configuring event notifications using the Amazon S3 console.

  • Transfer acceleration – Enable fast, easy, and secure transfers of files over long distances between your client and an S3 bucket. For information about enabling transfer acceleration, see Enabling and using S3 Transfer Acceleration.

  • Object Lock – Use S3 Object Lock to prevent an object from being deleted or overwritten for a fixed amount of time or indefinitely. For more information, see Locking objects with Object Lock.

  • Requester Pays – Enable Requester Pays if you want the requester (instead of the bucket owner) to pay for requests and data transfers. For more information, see Using Requester Pays buckets for storage transfers and usage.

  • Static website hosting – You can host a static website on Amazon S3. For more information, see Hosting a static website using Amazon S3.

You can view bucket properties using the AWS Management Console, AWS CLI, or AWS SDKs

  1. Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/.

  2. In the Buckets list, choose the name of the bucket that you want to view the properties for.

  3. Choose the Properties tab.

  4. On the Properties page, you can configure the above properties for the bucket.

View bucket properties with the AWS CLI

The following commands show how you can use the AWS CLI to list different bucket properties.

The following returns the tag set associated with the bucket amzn-s3-demo-bucket1. For more information about bucket tags see, Using cost allocation S3 bucket tags.

aws s3api get-bucket-tagging --bucket amzn-s3-demo-bucket1

For more information and examples, see get-bucket-tagging in the AWS CLI Command Reference.

The following returns the versioning state of the bucket amzn-s3-demo-bucket1. For information about the bucket versioning, see Retaining multiple versions of objects with S3 Versioning.

aws s3api get-bucket-versioning --bucket amzn-s3-demo-bucket1

For more information and examples, see get-bucket-versioning in the AWS CLI Command Reference.

The following returns the default encryption configuration for the bucket amzn-s3-demo-bucket1. By default, all buckets have a default encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). For information about the bucket default encryption, see Setting default server-side encryption behavior for Amazon S3 buckets.

aws s3api get-bucket-encryption --bucket amzn-s3-demo-bucket1

For more information and examples, see get-bucket-encryption in the AWS CLI Command Reference.

The following returns the notification configuration of the bucket amzn-s3-demo-bucket1. For information about the bucket event notifications, see Amazon S3 Event Notifications.

aws s3api get-bucket-notification-configuration --bucket amzn-s3-demo-bucket1

For more information and examples, see get-bucket-notification-configuration in the AWS CLI Command Reference.

The following returns the logging status for the bucket amzn-s3-demo-bucket1. For information about the bucket logging, see Logging requests with server access logging.

aws s3api get-bucket-logging --bucket amzn-s3-demo-bucket1

For more information and examples, see get-bucket-logging in the AWS CLI Command Reference.

For examples of how to return bucket properties with the AWS SDKs, such as versioning, tags, and more, see Code examples in the Amazon S3 API Reference.

For general information about using different AWS SDKs, see Developing with Amazon S3 using the AWS SDKs in the Amazon S3 API Reference.