Hosting a static website on S3
Amazon S3 allows you to host a static website. A static website can contain web pages with static content as well as client-side scripts. S3 does not support server side scripting and due to that, you cannot host a site with any server side scripting such as PHP, JSP, ASP.Net.
You can host HTML pages, CSS, client-side scripts like JavaScripts, and so on. Here's a step-by-step process to enable static website hosting on an S3 bucket:
- Sign in to your AWS console and go to S3 console at https://console.aws.amazon.com/s3.
- Click on the bucket on which you want to enable static website hosting.
- Click on the
Properties
tab as shown in the following screenshot:
Figure 8.23: Bucket properties tab
- Click on
Static website hosting
as shown in the following screenshot:
Figure 8.24: Enable static website hosting
- Specify index and error document for your website as shown in the following screenshot and click on
Save
. You can also configureRedirect requests
as needed and optionally...