- Published on
How to Host Your Static Website on Amazon S3
- Authors
- Name
- Gabe Cornejo
- @gcornejo555
How to Host Your Static Website on Amazon S3
Scroll to the bottom if you would like to watch the walkthrough.
Amazon S3 is a great option for hosting static sites. This guide provides a quick step-by-step process to get your static website up and running on S3.
Steps to Host Your Site on Amazon S3
Log into AWS
Open the Amazon S3 dashboard in your AWS Management Console.Create Bucket
Click “Create bucket”. Name your bucketrunmore-test-site
. Ensure 'Block all public access' is disabled to make your website publicly accessible.Go Into Your Bucket
Navigate to your newly createdrunmore-test-site
bucket.Upload Content
Drag and drop your website files (likeindex.html
) into the bucket or use the "Add files" option.Open Permissions Tab
Go to the “Permissions” tab in your bucket settings.Edit Bucket Policy
Click on “Bucket policy” and add the following policy to allow public access:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::runmore-test-site/*"
}
]
}
Vist Your Site Use the bucket’s public URL to access your site. This URL can be found in the bucket properties under “Static website hosting”.
Your static website will now be live on Amazon S3. This setup provides a cost-effective solution for hosting websites that do not require server-side code.
Discover more at:
- Amazon Web Services: AWS Documentation
If you have any further questions, feel free to ask!