AWS CloudFormation
User Guide (API Version 2010-05-15)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Amazon S3 Website Configuration Property

WebsiteConfiguration is an embedded property of the AWS::S3::Bucket resource.

Syntax

"WebsiteConfiguration" : {
   "ErrorDocument" : String,
   "IndexDocument" : String,
   "RedirectAllRequestsTo" : Redirect all requests rule,
   "RoutingRules" : [ Routing rule, ... ]
}     

Properties

ErrorDocument

The name of the error document for the website.

Required: No

Type: String

IndexDocument

The name of the index document for the website.

Required: No

Type: String

RedirectAllRequestsTo

The redirect behavior for every request to this bucket's website endpoint.

Important

If you specify this property, you cannot specify any other property.

Required: No

Type: Amazon S3 Website Configuration Redirect All Requests To Property

RoutingRules

Rules that define when a redirect is applied and the redirect behavior.

Required: No

Type: Amazon S3 Website Configuration Routing Rules Property

Example

"S3Bucket" : {
   "Type" : "AWS::S3::Bucket",
   "Properties" : {
      "AccessControl" : "PublicRead",
      "WebsiteConfiguration" : {
         "IndexDocument" : "index.html",
         "ErrorDocument" : "error.html"
      }
   }
}     

See Also