Skip to content

Commit d094657

Browse files
chore: add cost estmate to documentation (#5)
1 parent a3f993d commit d094657

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,39 @@ provider "aws" {
8686

8787
*To view sensitive secret, try `terraform output secret_access_key`*
8888

89+
## Cost Estimate
90+
91+
This cost estimate is based on **on-demand** pricing. AWS offers free tiers for some of these resources, which may reduce or eliminate costs for small-scale or new users.
92+
93+
Assuming 1,000 unique IPs traffic daily with the assumption of 1MB as page size, we'll have 30,000 Requests monthly and 30GB data transfer. Here's how the estimated breakdown will look like:
94+
95+
### S3
96+
- **Storage**: $0.023/GB (Standard Storage) (Assuming our app is 100MB) = $0.0023 (Pretty low)
97+
- **Request**: GET $0.0004 per 1,000 requests. 30,000 will be $0.012
98+
- **Data Transfer**: Too low - CloudFront caching
99+
100+
### CloudFront
101+
- **Data Transfer**: $0.085 per GB for the first 10TB = $0.085 * 30 = $2.55
102+
- **Request**: $0.0075 per 10,000 HTTP/HTTPS requests. 30,000 will be $0.0225
103+
104+
### WAF
105+
- **WebACL**: $5 per WebACL
106+
- **Rule**: $1 per rule per WebACL. Assuming 10 rules, the cost will be $10
107+
- **Requests**: $0.60 per 1 million requests. 30,000 requests will be $0.018
108+
109+
The total cost will be approximately **$2.586** for S3 and CloudFront, and $15.018 for WAF, making the grand total approximately $17.604.
110+
111+
Please note that these are just estimates. The actual cost may vary depending on the usage, data transfer, and number of requests. Also, this doesn't include potential costs for Route53, ACM, and other AWS services that might be used.
112+
113+
This changes drastically for 100M visits daily or weekly but latency will still be guaranteed.
114+
115+
This estimation serves as a rough guide. Actual costs may vary based on several factors, including the geographic distribution of requests, the size of the objects being requested, caching efficiency, and any applicable discounts or reserved pricing.
116+
117+
It’s important to employ strategies to minimize costs, such as optimizing content delivery, using budget alarms, employing efficient caching, and regularly reviewing usage patterns.
118+
119+
AWS offers a [pricing calculator](https://calculator.aws/#/) to provide more precise and tailored cost estimations, considering specific details and configurations of your static site deployment.
120+
121+
89122
## License
90123

91124
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.

0 commit comments

Comments
 (0)