GET Bucket website
Description
This implementation of the GET operation returns the website configuration
associated with a bucket. To host website on Amazon S3, you can configure a bucket
as
website by adding a website configuration. For more information about hosting websites,
go to Hosting Websites on Amazon S3 in the Amazon Simple Storage Service Developer Guide .
This GET operation requires the S3:GetBucketWebsite permission. By
default, only the bucket owner can read the bucket website
configuration. However, bucket owners can allow other users to read the
website configuration by writing a bucket policy granting
them the S3:GetBucketWebsite permission.
Requests
Syntax
GET /?website HTTP/1.1 Host:bucketname.s3.amazonaws.com Date:dateAuthorization:authorization string(see Authenticating Requests (AWS Signature Version 4))
Request Parameters
This implementation of the operation does not use request parameters.
Request Headers
This implementation of the operation uses only request headers that are common to all operations. For more information, see Common Request Headers.
Request Elements
This operation does not use request elements.
Responses
Response Headers
This implementation of the operation uses only response headers that are common to most responses. For more information, see Common Response Headers.
Response Elements
The response XML includes same elements that were uploaded when you configured the bucket as website. For more information, see PUT Bucket website.
Examples
Sample Request
This request retrieves website configuration on the specified bucket.
GET ?website HTTP/1.1 Host: example-bucket.s3.amazonaws.com Date: Thu, 27 Jan 2011 00:49:20 GMT Authorization: AWS AKIAIOSFODNN7EXAMPLE:n0Nhek72Ufg/u7Sm5C1dqRLs8XX=
Sample Response
HTTP/1.1 200 OK x-amz-id-2: YgIPIfBiKa2bj0KMgUAdQkf3ShJTOOpXUueF6QKo x-amz-request-id: 3848CD259D811111 Date: Thu, 27 Jan 2011 00:49:26 GMT Content-Length: 240 Content-Type: application/xml Transfer-Encoding: chunked Server: AmazonS3 <?xml version="1.0" encoding="UTF-8"?> <WebsiteConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <IndexDocument> <Suffix>index.html</Suffix> </IndexDocument> <ErrorDocument> <Key>404.html</Key> </ErrorDocument> </WebsiteConfiguration>


