Building this Website – Serverless Part 1
To build this website I decided that I would do it serverless. For those that do not understand the term serverless, I offer you this from Wikipedia.
Serverless computing is a cloud computing execution model in which the cloud provider dynamically manages the allocation of machine resources.
Normally, if I wanted to have a website like this I would have to have a server connected to the internet, or that I would share someone else’s server. However, in the cloud, or in this specific case, I can store my files in the cloud and set up the storage so that it acts like a web server. From the perspective of AWS there are servers and there is nothing magically happening here. But from my perspective, I don’t know about the AWS servers and furthermore, I don’t care.
One of the amazing benefits of this is that I only pay for what I use. So I pay for storage and the data traffic. And the rates are ridiculously cheap. A GB of storage is $0.023/month. Since this website is less than a GB, that is $0.023. Then I have to pay for traffic. That costs per request and per data transferred. If I’m lucky I’ll get 10,000 hits per month, that would be $0.004 for 10000 requests and about $0.45 for the data transferred. Total of about 48 cents per month. Less than a single postal stamp.
But cheap is only one advantage, the other advantage is the ability to grow. If I receive 1 million hits per month, AWS would just handle that for me. I’ll have to pay about $48 for the month, but I don’t have to worry about my server not being able to handle the extra load. AWS handles the scaling for me.
The only downside is that just using AWS like this the website can only be static. It can’t change as per a database or for different users. But AWS has ways to make that happen, but that is for another post.