A word before you start reading: This post will talk about AWS Cloud. This post isn’t a recommendation to work with AWS instead of GCP or Azure, it just happens that I work with AWS and know AWS more than the other two, so it’s easier for me to talk about it. That’s it, happy reading!
What started as a small glance at EC2 four years ago, turned into my first certification this week.
I’ve heard about the magic of serverless a few years ago, in my second or third year at the university. At first I thought the idea behind it was creating an App where all the data was inside it and it could communicate with other instances without a server in between. I mean, it’s called serverless, so it must be without a server. The little I knew…
Four years ago I got my first chance to work with an EC2 (don’t worry, I’ll explain everything) when me and two friends started making an App. I was in charge of the server side of the App and thought it would be wise to host it on a Windows EC2 as most of my knowledge was around C# and .Net. In a very few minutes, from the moment I clicked on “Create Instance” I had a fully operational Windows Server 2016 working for me.
I was already aware of all the VMs and servers stuff, but that completely amazed me. The ease of use, creation and access was (and still is) astonishing.
Two years ago, we decided to build a system on the Cloud (Capital “C” is required here). This is the moment I think I was really introduced to the Cloud and the Serverless notion. A huge world of options. A service for every need. Slowly, I began my journey into the world of Clouds.
What is a “Cloud”?
Actually, it’s called a “Cloud” because when you draw many servers side by side, all the circles of the servers get combined into one shape that looks like, well, a cloud.
The Wikipedia definition is as follows: “Cloud computing is the on-demand availability of computer system resources, especially data storage (cloud storage) and computing power, without direct active management by the user.”
Let’s break this down:
“On-demand availability of computer system resources…” – This means that I (as a user) can have computer system resources, such as Memory, CPU and Storage whenever I want.
“…Without direct active management by the user” – Meaning that I, the user, don’t have to actively manage any of the resources I use. The management is something I get as a service.
At its most basic level, cloud computing is IaaS, infrastructure as a service. I receive an infrastructure ready to go as a service from the cloud provider. That’s the most basic cloud computing idea. In AWS, one of its IaaSs is called EC2, Elastic Cloud Computing. It’s a fancy name for a VM. They supply the infrastructure so that you can deploy a VM on top of it and use it as any other VM. It can be connected to the internet and to the inner AWS network.
From that simple idea of IaaS, many more applications arrived. When using an EC2, you are responsible for OS updates and monitoring resource usages. But what If I just want to run a simple python script now and then? Do I need the overhead of the whole OS?
Think about this scenario, you have a simple python script that you want to run every few minutes. Do you really care if it runs under Windows or Linux? Let’s say it’s a really simple script, do you care how much memory or CPU you have available? You just want to run your script, not maintain a whole OS.
This is where the power of the Cloud is noticed.
I just want to run my function, don’t bother with OS updates, firewall, memory, disk, cpu and such.
Introducing AWS Lambda (Azure Functions or GCP CloudRun). This service does exactly that. You write the function, the service runs it. You don’t care on top of what server it runs. That is Serverless.
There are, at the moment of writing, more than 200 different services on AWS, more than 400 services on GCP and more than 600 different services on Azure. Many of them have a lot of different options to accommodate your needs.
There are queuing services, to manage messages from different services.
There are notification services that allow you to send mails, SMS and such to different subscribers. There are ML and AI services, Container services, Storage, CDN and more. The list is really huge and they all just keep adding.
Now you may ask yourself, why should I use a Lambda function and not an EC2. “I know Linux, I feel more comfortable running my script on an OS”. Well, beside the downfalls I described earlier, there is one more (huge) difference; the price. Lambda functions are much (much) more economic than running an EC2. And that’s another difference between all the services. You better choose the right service for your needs as it will be cheaper for you to run it for what it was made.
And that’s the Cloud.
It’s not in the sky, it’s someone else’s computer.
As you see, there are many services, options, providers and products to know, and the number only increases. That’s why each Cloud provider (Amazon, Microsoft and Google) have a learning path. Courses and certifications that really require you to learn the nuts and bolts of the services. Each course I took had a different aspect on the services and was really different from the others. Sometimes they talked about the same services but from different angles. One talked about EC2 from a security perspective. Another talked about EC2 from a technical perspective. And a third one talked about EC2 from an operations perspective. Three different courses, about one service and I learnt different things. That’s amazing.
The developer’s learning path never ends. I always think of how little I know and try to keep up with the world.
Never stop learning.