A super quick overview of serverless
Understand serverless quicker than it takes to brew your coffee or tea.
What is serverless?
Serverless is a different way of developing. Rather than having a dedicated server (e.g., an EC2 instance) where you have to install the packages, configure runtimes, and cyber harden it.
Serverless is a different way of developing. Rather than having a dedicated server (e.g., an EC2 instance) where you have to install the packages, configure runtimes, and cyber harden it.
With serverless, you can rely on services to do what you need (e.g., compute, database, and storage).
It doesn’t mean you don’t have servers. It means you rely more on your provider’s services or functionality (e.g., AWS) provides.
Types of serverless services
There are different types of serverless services.
The most commonly known are for functions or code execution. That would be Lambda.
APIs (that would be API Gateway).
Databases (like DynamoDB).
Object storage (like S3).
There are also other things you can do with orchestration. You can use CloudWatch events, CICD with CodePipeline, CodeBuild, AI, and ML with SageMaker.
You can integrate all these services together depending on your architecture.
Why choose serverless?
There are different reasons, but it comes down to allowing you to be more agile and focus more on building and developing rather than maintaining, securing, and configuring.
It comes in handy when you’re building prototypes, have a small team, or want to provide the most value with the least amount of maintenance effort.
Serverless computing, designs, and architectures are not silver bullets. Sometimes, dedicated servers are more beneficial in some designs. These are just some common reasons why you would want to use it.
An example of a serverless architecture on AWS
This is an example of a serverless architecture built on AWS.
We have a serverless website that runs a single-page application that a browser can use to run that web app.
You can use the CloudFront service to deploy a content delivery network that provides caching at edge routers. That way, the web application loads much faster when a user visits it.
You can use the S3 service for website hosting. You can connect the CloudFront and the bucket so any HTML, CSS, or JavaScript file and image file that is loaded from the bucket gets cached via the CloudFront service.
You can also build up your DNS (domain name service) on Route 53 or use an external domain name service. If you use Route 53, then the automatic deployment of any DNS records is managed through the AWS processes.
The backend can also be serverless by using an API gateway to send HTTP events to Lambda functions. A lambda function will run its code. If needed, it can get data from a database (like a DynamoDB table).
The web app will communicate with your backend, and then if you have a mobile app, that too can make API calls to the API gateway.
Before you go
Here are other posts you might enjoy.