Amazon S3 Website Configuration Property
WebsiteConfiguration is an embedded property of the AWS::S3::Bucket resource.
Syntax
JSON
{ "ErrorDocument" :String, "IndexDocument" :String, "RedirectAllRequestsTo" :Redirect all requests rule, "RoutingRules" : [Routing rule, ...] }
YAML
ErrorDocument:StringIndexDocument:StringRedirectAllRequestsTo:Redirect all requests ruleRoutingRules: -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: Yes
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: List of 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
-
Custom Error Document Support in the Amazon Simple Storage Service Developer Guide
-
Index Document Support in the Amazon Simple Storage Service Developer Guide
