Cost of learning
One of the best ways to learn something new is to actually try it. I wanted to learn how to use AWS and some of its services, so I moved my projects to AWS. This was just a very basic setup (EC2, S3, CloudFront). Later I wanted to use additional services like Cognito, RDS, MediaConvert, Simple Queue Service, Simple Email Service, etc. So I started building a new project where I was able to use those. It started "slowly" with costs like $20 per month, grew with database to $100 per month and later to almost $300 per month with Kubernetes and other services. And now I am back to $20 per month.
Kuberneters (EKS)
At work, we faced scaling issues and downtime. At that time, the whole project was one big monolith. For one part of our application it made sense to split it from the monolith into its own microservice. While working on this, I wanted to try and learn Kubernetes, so when it is done I know how to deploy it. Therefore I moved my projects (again) to Kubernetes. Looking back...what a waste. Imagine having a couple of simple projects, used by maybe 10 users per month, on Kubernetes. The cost? Slightly below $300.
Name | Cost |
---|---|
Elastic Load Balancing | $24.13 |
Amazon Relational Database Service | $66.13 |
Amazon Elastic Compute Cloud | $97.13 |
Amazon Elastic Container Service for Kubernetes | $89.28 |
..... | ... |
Total | $294.49 |
Container Service (ECS)
A couple of months later (still paying < $300) I decided to clean things up. There is no need to run my projects in Kubernetes, so I started to read about Elastic Container Service and migrated my projects to ECS. The price dropped to ~ $180 per month. The first setup is a real pain, but once you understand how things work, it gets better.
DynamoDB
It was still a bit expensive, especially since these were just example projects / learning projects that are not generating any revenue. I reviewed the bill and the biggest price is now EC2 and RDS. I was using Aurora MySQL, which even with the lowest requirements costs tens of dollars. I was thinking maybe the database is not needed in such small projects. But it is all about the learning and experience. If I do not have a database there, then I would not use security groups, IAM roles, etc. Reading about other options I came to DynamoDB. I had to watch several videos about data modeling and then the fun begun. Each project had to be updated to use this new NoSQL database. Finally, the price dropped again to ~ $100 per month.
AWS API Gateway and Lambda
I started to question my setup. Do I really need a backend for my project? Do I really need worker there? Is there any other option what I can use? And just like this I started playing with an idea to use Lambda functions. I created my first API Gateway, connected it with functions and celebrated when my dev environment was working without any running container. There were other challenges, such as triggering function when a new item is added to the database. But it is really easy with Dynamo DB Streams and trigger filters. After these changes, or better, after I replicated everything using API Gateway and Lambda, the costs dropped to ~ $25.
Do you like this post? Is it helpful? I am always learning and trying new technologies, processes and approaches. When I struggle with something and finally manage to solve it, I share my experience. If you want to support me, please use button below. If you have any questions or comments, please reach me via email juffalow@juffalow.com.
I am also available as a mentor if you need help with your architecture, engineering team or if you are looking for an experienced person to validate your thoughts.