Originally published on rolfstreefkerk.com
Take full control of your website, and following along with our how-to guide.
Benefits of building a...
For further actions, you may consider blocking this person and/or reporting abuse
Hi Rolf Streefkerk,
Top, very nice !
Thanks for sharing
I need this setup often, there has to be an easier way than investing an hour or so on this 🤔
I managed to write a Github action that goes all this with minimal dependencies, blog repo
Yes you could host on github actions the terraform script and run everything based on a git action.
This article was meant as a starting poiint that you can adjust as you see fit with your workflow.
Thanks for reading!
Very comprehensive and detailed article!
Can you specify the cost of the caused cloud resources? How much does it cost for a month?
This would really depend on your traffic, but lets say for any starting website with a few thousand viewers a month you're looking at;
Domain (yearly one time fee, for a .com ~ 10 USD) = ~10 USD = 0.83 USD
Route 53 Hosted zone ; $0.50 per month for the first 25 hosted zones = 0.5 USD
S3 5GB of Amazon S3 storage in the S3 Standard storage class; 20,000 GET Requests; 2,000 PUT, COPY, POST, or LIST Requests; and 100 GB of Data Transfer Out each month. Free storage probably, otherwise very low cost storage. Traffic beyond free tier it's 0.005 USD for 1000 in requests, 0.0004 USD for 1000 out requests.
Cloudfront you're likely operating in the free tier, including SSL, request in-out
aws.amazon.com/cloudfront/pricing/
Total: 1.33 USD per month incl. ".com" domain name for most small to medium use-cases.
Looks pretty straightforward for a static website 🙃
what do you mean exactly?
I’m assuming the commenter above is referring to the vast number of steps required to setup a static website on AWS. There are actually easier ways with fewer steps, for instance using AWS Amplify.
The upside to the approach you present here though is that you explain many of the details that a solution like Amplify hides. If someone just wants to deploy a static site without knowing much about the details, Amplify is probably what they want. But if someone wants to understand the steps involved so they can grow to more complicated deploys or even move to other cloud providers, then I think your article is a nice resource. :)
Yes i believe you've summarized it perfectly.
This is a "vehicle" for learning, and at the same time if you prefer control over what is deployed exactly you will have that with Terraform over something like Ampllify that hides much of this.
Thanks for your time
Thanks for this, the one thing that would hold me back would be the risk of very high AWS fees as a consequence of some error with the code and so other external factor.
You can verify all resources deployed in the github repo's I've provided.
github.com/rpstreef/terraform-stat...
In my opinion;
You make a valid point with regards to AWS cost tracking.
In my opinion, what you can do is:
Add Budget Alerts to your AWS Account and set several of them with different value amounts to track your overal account spend.
Use this Terraform module to implement them:
github.com/cloudposse/terraform-aw...
Alternatively, use the AWS Console UI to set it in the Budget screen.
I hope that helps