Personal Website on AWS, Part 1: S3
Skip Wix and Squarespace, host a real static site on S3 and actually understand what's happening under the hood.
Photo by John Schnobrich on Unsplash*
Wix, Squarespace, and WordPress will get you a website faster, but building one on S3 teaches you something those platforms hide from you entirely. This isn't a design tutorial — it's the infrastructure underneath.
This is Part 1 of two: this half covers the bare-minimum S3 setup. Part 2 adds a custom domain, SSL, and CloudFront.
You'll need an AWS account already set up before starting.
What S3 actually is
S3 is cheap, highly available, durable cloud storage that can hold basically any volume or type of data: static website hosting is just one of many things it's built for.
Creating the bucket
- Open the S3 service in the console
- Click Create a bucket
- Bucket name: use your intended domain (e.g.
saidilipponnagantiforsaidilipponnaganti.com) - Region:
us-east-1is a safe default - Block Public Access: uncheck "Block all public access" and acknowledge the warning
- Leave everything else default and click Create bucket
Uploading your site
- Have your HTML/CSS ready (a free template from HTML5 UP works fine if you don't have your own design yet)
- Click Upload inside the bucket
- Drag your files in
- Click Upload and wait for it to finish
- Close the status page
Turning on static website hosting
- In the Properties tab, find Static website hosting and click Edit
- Select Enable
- Choose Host a static website
- Set the index document to your main HTML file (required)
- Optionally set an error document
- Save: a hosting link now appears at the bottom of the Properties tab
That link will 403 for now — that's the permissions step, next.
Setting permissions
- Go to the Permissions tab
- Confirm public access is allowed (type "confirm" if prompted)
- Under Bucket Policy, click Edit and paste:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::BucketName/*"
}
]
}
- Replace
BucketNamewith your actual bucket's name - Save, then revisit your hosting link: the site should load
Static vs. dynamic, quickly
Static sites are just HTML and CSS: the same content for every visitor, fast to load, cheap to build, with the content baked right into the code. Good for informational sites.
Dynamic sites respond differently per user and lean on server-side code like PHP or Node.js: more capability, more moving parts.
Worth turning on later (small extra cost)
- Bucket versioning: recover from an accidental delete
- Default encryption: protect data at rest
Next up
Part 2 covers CloudFront, buying a real domain, and getting HTTPS working with a free SSL certificate.
Practical guide: setting this up yourself
A condensed, in-order checklist of everything above.
- Create the bucket. In the S3 console, click Create a bucket, name it after your intended domain (e.g.
saidilipponnagantiforsaidilipponnaganti.com), pick a region (us-east-1is a safe default), and uncheck "Block all public access," acknowledging the warning. - Upload your site files. Have your HTML/CSS ready (a free HTML5 UP template works if you don't have your own design), click Upload inside the bucket, drag your files in, and wait for the upload to finish.
- Turn on static website hosting. In the Properties tab, edit Static website hosting, select Enable, choose Host a static website, set the index document to your main HTML file (required), and optionally set an error document. The hosting link that appears will 403 until permissions are set.
- Set the bucket policy. In the Permissions tab, confirm public access is allowed, then edit the Bucket Policy and paste a
PublicReadGetObjectstatement withEffect: Allow,Principal: *, andAction: s3:GetObjectonarn:aws:s3:::BucketName/*, replacingBucketNamewith your actual bucket's name. - Verify it loads. Revisit the hosting link from the Properties tab. It should serve your site now that the policy is in place.
- Turn on versioning and encryption later. Both are small extra costs worth adding once the basics work: versioning to recover from an accidental delete, default encryption to protect data at rest.
- Move on to Part 2 when ready. Part 2 adds a custom domain, CloudFront, and a free SSL certificate for HTTPS.