Infra & Cloud
terraform
Intermediate
AWS S3 Static Website
Terraform module to provision an S3 bucket for static website hosting.
terraform
resource "aws_s3_bucket" "site" {
bucket = var.bucket_name
}
resource "aws_s3_bucket_website_configuration" "site" {
bucket = aws_s3_bucket.site.id
index_document { suffix = "index.html" }
error_document { key = "404.html" }
}
Prerequisites
- terraform >= 1.0
- AWS provider
Pro Tips
- → Add CloudFront distribution for HTTPS.
Commercial Licensing
Acquire a production access token or template license for enterprise deployment.
Module Info
- Language
- terraform
- Level
- Intermediate
- Read time
- 4 min
- Published
- Sep 2026
- License
- Commercial License
Newsletter
New modules every week, directly to your inbox.
Similar Modules
AWS RDS Postgres Terraform
Terraform resource for an RDS PostgreSQL instance with encryption and backup.
terraform
·
Intermediate
ECS Task Force Stop
Force-stop all running ECS tasks in a service for emergency rollback.
bash
·
Intermediate
AWS VPC with Public and Private Subnets
Terraform VPC module with NAT gateway, route tables and subnet tagging for EKS.
terraform
·
Advanced