CmdID

CmdID / aws / aws s3

aws s3 website

Set the website configuration for a bucket. AWS CLI reference

1 example 2 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To configure an S3 bucket as a static website

The following website example configures a bucket named amzn-s3-demo-bucket as a static website. The index document option specifies the file in amzn-s3-demo-bucket that visitors will be directed to when they navigate to the website URL. In this case, the bucket is in the us-west-2 region, so the site would appear at http://amzn-s3-demo-bucket.s3-website-us-west-2.amazonaws.com.

All files in the bucket that appear on the static site must be configured to allow visitors to open them. File permissions are configured separately from the bucket website configuration.

aws s3 website s3://amzn-s3-demo-bucket/ --index-document index.html --error-document error.htmlIdentify
--index-documentA suffix that is appended to a request that is for a directory on the website endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/ the data that is returned will be for the object with the key name images/index.html) The suffix must not be empty and must not include a slash character.
--error-documentThe object key name to use when a 4XX class error occurs.

This command produces no output.

For information on hosting a static website in Amazon S3, see Hosting a Static Website in the Amazon Simple Storage Service Developer Guide.

Options

2 in the AWS CLI reference
--error-documentThe object key name to use when a 4XX class error occurs.
--index-documentA suffix that is appended to a request that is for a directory on the website endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/ the data that is returned will be for the object with the key name images/index.html) The suffix must not be empty and must not include a slash character.