Getting Information About a Bucket Website

You can get information about the configuration of a bucket website.

Getting Information About a Bucket Website Using AWS CLI (s3api)

Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI.

To get information about the website configuration of your bucket, use the get-bucket-website command following this syntax:

Request sample
$ aws s3api get-bucket-website \
    --profile YOUR_PROFILE \
    --bucket BUCKET \
    --endpoint https://oos.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • bucket: The name of the bucket in which the website is hosted.

  • endpoint: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.

The get-bucket-website command returns the following elements:

Result Sample
{
    "IndexDocument": {
        "Suffix": "index.html"
    },
    "ErrorDocument": {
        "Key": "error.html"
    }
}
  • IndexDocument: The name of the index document configured for the website.

  • ErrorDocument: The name of the error document configured for the website.

Related Pages

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.