How to optimize infrastructure using AWS Serverless
Can infrastructure costs be reduced by several times simply by changing the architecture? Arman Nurgaliyev, CTO of Freedom Cloud Kazakhstan, explains when serverless truly saves budgets, why Lambda is not a universal solution, and in which scenarios it works better than Kubernetes.
About Me
My journey began in the energy sector, and later I transitioned into IT. Currently, my team and I are building public and computational clouds in Kazakhstan, and I want to share my experience in the field of cloud solutions.
What is Serverless
There are three classic models in infrastructure:
- IaaS — you buy a machine and maintain it yourself.
- PaaS — you lease a machine, and the company helps with maintenance.
- SaaS — you simply call a taxi without worrying about the car.
Example: A vending machine operates only when you place an order. At night, it sits idle — and you don't need to pay for its operation. Similarly with serverless: if the load is not constant, costs decrease significantly.
Practice
I worked in Saudi Arabia on a ticketing platform for concerts. During the peak season, we paid $12,000 per month for Kubernetes and databases. After switching to AWS Lambda, costs dropped to $6,000 per season and $3,000 during the off-season.
Lambda scales automatically: when a request comes in, the function starts, processes it, and finishes. You pay only for the executed request.
Lambda Limitations
— execution time limited to a maximum of 15 minutes
— not all languages are supported
— cold start — delay during the first launch
— complex monitoring and debugging — tools like AWS CloudWatch are required.
Where to Use
Serverless is suitable for tasks with irregular loads: reports, HR systems, peak events, backups. For example, the accounting department at Aviasales generates reports several times a day — there's no need to keep a container running 24/7; Lambda handles it in minutes.
Serverless reduces costs, accelerates scaling, and allows startups to manage without large DevOps teams. However, it is not a universal solution: under constant load, using clusters is more cost-effective.
The Tech on Telegram Follow The Tech on Telegram
Keep up with the latest technology and startup news.