Savings Money in the cloud (hobbyist)
Overview
This will be a short article with potential to see future additions. The idea is to serve as a reminder to always re-evaluate once setup every once in a while, especially when said setup is mostly for personal use and does not bring any revenue (hence the hobbyist in the title).
While the cloud can be great for offloading some in-house resources in a business setup, and saving money otherwise spent on talent - this same concept can prove to be costly on a small/personal scale.
For example if a company has a highly available database with many TBs worth of data and it pays a team of 6 DBAs globally to maintain this database - such a company may save money by paying AWS and using RDS.
However me paying AWS for their backup solution monthly, while I can write a cronjob on my handful of servers and sync my data for free is a no brainer.
EC2
This is probably an obvious one, but unless your compute is for testing you should most likely be using Reserved instances. AWS claims you can save up to 72% - in my case this was somewhere around 53% (from ~$8.20 to ~$3.80).
The process is relatively easy too - you purchase a reserved instance type and then the reserved instance is immediately applied to any running instance you may have of the same type in the relevant region (reserved instances are bound to a region).
If you have purchased only 1 reserved instance but have more than one instance running your discount is only applied to one of the instances.
DNS (Route53)
The choice for me here was to move to cloudflare. I’ve used cloudflare for some domains before I got on AWS. However I always seemed to stick with Route53 for everything AWS related as it has some pretty good integrations.
While the monetary benefit of this move was very small (my Route53 bill was under $1.5 pm) - I do get more for less from cloudflare with their free plan.
I can’t speak about their enterprise plan vs route53 but for personal use what cloudflare offers for free is great.
Backups (and storage)
In both my git on ECS article and the mailcown setup one, I show a use case of EFS for centralised / automated backup. The benefit here was easy of use: EFS has automatic backups and can easily be mounted on a running ec2 instance.
The problem is that EFS is a notoriously expensive service and once again makes little to no sense being used simply as a backup/git storage.
The solution here was somewhat obvious - write a cronjob to take a daily backup of mailcow and git and send the “daily copy” to an S3 bucket. The bucket has a lifecycle policy to manage the retention and costs.
Authentication is handled via an IAM role. Additionally as both the ec2 instcane and bucket are in the same region - there is no costs for moving the daily backup.
Conclusion
Make a habbit to have a look at your bill across the various providers every now and then. Be on the lookout for new tech and wherever the work seems less than the cost of outsourcing - DIY is the way.
If you’ve enjoyed this, make sure to go ahead and look at the Articles section.
My personal projects you can find on my git server.
If you have a question or want to get in touch, feel free to email me.
Thank you for reading and have a good night!