On a AWS free account this will cost around $0.60 per month (not including domain registration)
A cloudfront hosted website that uses a private s3 backend
+------+ +--------------+ +------+
| | | | | |
| DNS | +---> | CloudFront | +--> | S3 |
| | | | | |
+------+ +--------------+ +------+
Cloudwatch billing and usage alerts to pager duty based of customisable thresholds
+------------+ +-------+ +-------------+
| | | | | |
| Cloudwatch | +---> | SNS | +--> | Pagerduty |
| | | | | |
+------------+ +-------+ +-------------+
If actual or forecasted budget is exceeded an email is sent and the static website shutdown automatically
+------------+ +-------+ +-------------+ +-------------+
| | | | | | | |
| Budgets | +---> | SNS | +--> | Lambda | +--> | CloudFront |
| | | | | | | |
+------------+ +-------+ +-------------+ +-------------+
- Terraform (+v0.13)
- An AWS account (free tier)
- Pagerduty account (free tier)
- Remove line 8 in
main.tfbackend.s3 - copy the example tfvars file and edit
cp example.tfvars terraform.tfvars- edit
terraform.tfvarsto fit your needs
Note: The descriptions ofvariables.tf can give you hints