Deleting a Bucket Website

You can delete the website configuration of a bucket.

Deleting a Bucket Website Using AWS CLI (s3api)

To delete a bucket website, use the delete-bucket-website command following this syntax:

Request sample
$ aws s3api delete-bucket-website \
    --profile YOUR_PROFILE \
    --bucket BUCKET \

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • bucket: The name of the bucket in which the website is hosted that you want to delete.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

Related Pages

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.