Use Amazon S3 for Static Website
Step Guide for Amazon S3 static websites¶
You can use Amazon S3 to host a static website. With a static website, the individual web pages include only static content that does not change frequently. This is different from using a dynamic website, where the content is constantly changing and constantly updated. From the AWS Management Console, you can easily configure your bucket for static website hosting without needing to write any code.
You can configure a static website through the AWS Console.
To host a static website on Amazon S3, you configure a bucket for website hosting and then upload your content. When you configure a bucket as a static website, you must enable website hosting, set public read permissions, and create and add an index document.
Depending on your website requirements, you can also configure redirects, web traffic logging, and a custom error document. If you prefer not to use the AWS Management Console, you can create, update, and delete the website configuration programmatically by using the AWS SDKs.
For the best compatibility, we recommend that you avoid using dots (.) in bucket names, except when using buckets for static website hosting. If you include dots in a bucket name that is not a static website, you can’t use virtual-host-style addressing over HTTPS, unless you perform your own certificate validation. This is because the security certificates used for virtual hosting of buckets don’t work for buckets with dots in their names. Virtual hosting is the practice of serving multiple websites from a single web server.
For more information on virtual hosting or using buckets as a static website, follow the link listed below by choosing the VIRTUAL HOSTING button.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html