AWS- S3 Static Website hosting- Lab
S3 supports hosting a static website(HTML, HTML with CSS, JavaScript), it does not support dynamic website (server-side processing like java,php.asp.net) hosting.
Prerequisite:
s3 Bucket : A valid bucket should be already created.
Html Pages: Create index.html(Landing Page),errors.html (Error Page) file with valid html code.
Access Level: Public Access using bucket policy Bucket Policy
Step 1: Enable versioning for the bucket.
Step 2: Upload index.html and error.html files to the bucket.
Step 3: Goto bucket Properties (Properties Tab)
Step 4: Select the Static Web Hosting option and click on the Edit button
Step 5: Select Enable Option.
Step 6: Select option Select Hosting type–> Host a static website.
Step 7: In Index document specify index.html and in Error document specify error.html.
Step 8: Click on Save Changes button.
Step 9: There will be a Bucket Website endpoint created.
Step 10: Click on this endpoint, you should be able to access the index page.
Experiments
Upload the HTML files which is other than index.html and error.html
Disable the versioning and check are you able to host the website