Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Configure an Amazon S3 Bucket as a Website and Enable Logging - AWS Tools for PowerShell

Configure an Amazon S3 Bucket as a Website and Enable Logging

Use the Write-S3BucketWebsite cmdlet to configure an Amazon S3 bucket as a static website. The following example specifies a name of index.html for the default content web page and a name of error.html for the default error web page. Note that this cmdlet does not create those pages. They need to be uploaded as Amazon S3 objects.

PS > Write-S3BucketWebsite -BucketName website-example -WebsiteConfiguration_IndexDocumentSuffix index.html -WebsiteConfiguration_ErrorDocument error.html RequestId : A1813E27995FFDDD AmazonId2 : T7hlDOeLqA5Q2XfTe8j2q3SLoP3/5XwhUU3RyJBGHU/LnC+CIWLeGgP0MY24xAlI ResponseStream : Headers : {x-amz-id-2, x-amz-request-id, Content-Length, Date...} Metadata : {} ResponseXml :

See Also

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.