cd /news/ai-tools/hosting-a-static-website-on-aws-with… · home › topics › ai-tools › article
[ARTICLE · art-180776] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

Hosting a Static Website on AWS with Terraform: My Tamil Nadu Tour Guide Project

Software developer Divyapriya S built the Tamil Nadu Tour Guide, a static website hosted on Amazon S3 and provisioned entirely with Terraform, including an AI guide powered by PartyRock. The Terraform configuration creates nine resources — a uniquely named S3 bucket, public access settings, website configuration, a public-read bucket policy and per-file object uploads — and can be torn down with a single terraform destroy.

key takeaway

A static S3 site can be fully provisioned with Terraform using a random_id suffix for global bucket-name uniqueness, a public-read bucket policy paired with relaxed Block Public Access, and aws_s3_object uploads that re-upload only changed files.

by read1 min views9 publishedDec 3, 2026

By Divyapriya S — Software Developer | Cloud Engineer

One command to build a website on AWS, and one command to remove it. That idea — Infrastructure as Code — is at the heart of my latest project.

I built the Tamil Nadu Tour Guide, a static website that helps visitors explore places in Tamil Nadu by type, plan a quick trip, discover local food, and open an AI guide built with PartyRock. Instead of clicking through the AWS console, I managed everything with Terraform.

**Live website:** [http://tamilnadu-tour-guide-6e9ce982.s3-website.ap-south-1.amazonaws.com/#places](http://tamilnadu-tour-guide-6e9ce982.s3-website.ap-south-1.amazonaws.com/#places)

**Source code:** [https://github.com/DivyaPriya250413/tn-tour-guide-terraform](https://github.com/DivyaPriya250413/tn-tour-guide-terraform)

git clone..tf files and ran the workflow: init → validate → plan → apply. index.html, CSS and JavaScript — no web server needed. random_id.suffix — an 8-character hex suffix, because S3 bucket names must be globally uniqueaws_s3_bucket.site — the bucket tamilnadu-tour-guide-6e9ce982 aws_s3_bucket_public_access_block.site — relaxes Block Public Access for this bucket so the public policy can workaws_s3_bucket_website_configuration.site — enables website hosting with error.html aws_s3_bucket_policy.public_read — allows public s3:GetObject so visitors can read the siteaws_s3_object.site_files — uploads each file in website/ with the correct content type, re-up only changed files The result of terraform apply: Apply complete! Resources: 9 added, 0 changed, 0 destroyed. bucket_name = "tamilnadu-tour-guide-6e9ce982", website_url = "http://tamilnadu-tour-guide-6e9ce982.s3-website.ap-south-1.amazonaws.com"

terraform.tfstate lets terraform destroy removes everything Terraform created, and stopping the EC2 instance keeps costs low. Visit the Tamil Nadu Tour Guide here: http://tamilnadu-tour-guide-6e9ce982.s3-website.ap-south-1.amazonaws.com/#places

The full step-by-step guide, with every command explained, is in my PDF guide: Hosting a Static Website on AWS with Terraform — The Tamil Nadu Tour Guide site, built with Amazon S3, EC2 and GitHub

── more in #ai-tools 4 stories · sorted by recency
── more on @divyapriya s 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/hosting-a-static-web…] indexed:0 read:1min 2026-12-03 · —