AWS 101:Introduction to  Serverless, AWS Lambda, Beanstalk and Lightsail

AWS 101:Introduction to Serverless, AWS Lambda, Beanstalk and Lightsail

Intro to Serverless, AWS Lambda, AWS Elastic Beanstalk, AWS Lightsail

Hi there if you are here I assume you are already versed with the basics about the AWS, but if you are new to the AWS I will highly recommend you to go through my previous article listed below which would cover your basics to the AWS and the Introduction to the IAM Groups, Deploying the EC2 instances which are considered to be the stepping stones to the world of AWS.

AWS Introduction and IAM Service

Introduction to EC2 Service

[Highly Recommended] Also you could checkout my series for a Newbie DevOps Engineers any DevOps Enthusiast.

Every DevOps Novice must know

What is Serverless ?

Serverless is a cloud-native development model that allows developers to build and run applications without having to manage servers.

There are still servers in serverless, but they are abstracted away from app development. A cloud provider handles the routine work of provisioning, maintaining, and scaling the server infrastructure. Developers can simply package their code in containers for deployment.

Once deployed, serverless apps respond to demand and automatically scale up and down as needed. Serverless offerings from public cloud providers are usually metered on-demand through an event-driven execution model. As a result, when a serverless function is sitting idle, it doesn’t cost anything.

What are the advantages of the Serverless ?

Lower costs :

Serverless computing is generally very cost-effective, as traditional cloud providers of backend services (server allocation) often result in the user paying for unused space or idle CPU time.

Simplified scalability:

Developers using serverless architecture don’t have to worry about policies to scale up their code. The serverless vendor handles all of the scaling on demand.

Simplified backend code:

With FaaS, developers can create simple functions that independently perform a single purpose, like making an API call.

Quicker turnaround

Serverless architecture can significantly cut time to market. Instead of needing a complicated deploy process to roll out bug fixes and new features, developers can add and modify code on a piecemeal basis.

SERVERLESS MINDMAP:

mindmap.png

Different types of Serverless Services on AWS?

If you choose to develop a serverless application, you don’t have to spend money on infrastructure, own room for it, or hire a team for server maintenance. There are a lot of cloud providers that offer the necessary tools for developing such applications. One of them is AWS, the leader in cloud computing with various services in one place.

  • AWS Lambda

  • AWS Fargate

  • AWS DynamoDB

  • Amazon Aurora

  • AWS CloudWatch

  • Amazon SNS

  • Amazon SQS

  • Amazon Cognito

  • Amazon API Gateway**

What is AWS Lambda ?

AWS Lambda is a serverless compute service that runs your code in response to events and automatically manages the underlying compute resources for you. These events may include changes in state or an update, such as a user placing an item in a shopping cart on an ecommerce website.

image.png

What is Elastic Beanstalk ?

Elastic Beanstalk is a service for deploying and scaling web applications and services. Upload your code and Elastic Beanstalk automatically handles the deployment—from capacity provisioning, load balancing, and auto scaling to application health monitoring.

[Recommended] For more details and hands on you could visit the link below

Introduction Elastic Beanstalk and Handson

AWS LAMBDA VS AWS ELASTIC BEANSTALK

AWS Lambda

  • It is mainly used to run the short running code functions.

  • Lambda can only handle one request at a time

  • Lambda acts as serverless i.e. the whole underlying infra is abstracted from the developer here.

  • The resources required are auto generated like EC2 instances, load balancer, auto-scaling groups etc.

  • Lambda has cold start issues it means that the infrastructure needs to be provisioned on demand

AWS Elastic Beanstalk

  • It is mainly used to deploy the long running applications.

  • In the Elastic Beanstalk it can handle multiple requests at a time by the underlying EC2 instance in Elastic Block

  • EB gives out the granular level access to the developer such that he can opt for the infrastructure which is required.

  • In EB we generally have EC2 instance already provisioned to handle our requests

What is AWS Lightsail ?

Amazon Lightsail is a virtual private server (VPS) provider and is the easiest way to get started with AWS for developers, small businesses, students, and other users who need a solution to build and host their applications on cloud.

lightsail.png

AWS LIGHTSAIL VS AWS ELASTIC BEANSTALK

AWS Lightsail

  • If user wants to just deal with the deployment of simple application without the hassle of configuration then the best choice is to go for the Lightsail.

  • Lightsail plan comes in a bundle with a fixed amount of RAM, vCPUs, SSD and a free data transfer allowance, with static IP addresses and DNS management.

  • Lightsail doesn’t support autoscaling, you have to manually add an app yourself.

  • Lightsail is not that compatible with the Dockerized Applications; but with the pre-configured development stack it works as a charm likeWordpress, JOOMLA etc.

  • Application Templates supported are as follows

    • WordPress,
    • Drupal,
    • Joomla!,
    • Ghost, Magento, Redmine,
    • LAMP, Nginx (LEMP), MEAN,
    • Node.js, Django, and more.

AWS Elastic Beanstalk

  • If the user wants to gain more granular level access over the configurations then they should proceed over the Elastic Beanstalk.

  • Under EB it gives out the granular level access to all the resources under its provision such as EC2 Instances, Auto Scaling Group, Load Balancers, S3 and optionally AWS Relational Database Service (RDS).

  • Elastic Beanstalk uses EC2 Autoscaling Group to handle elasticity.

  • EB is better fitted with the Dockerized Applications.

  • Platform supported are as follows

    • Apache Tomcat
    • Nginx or Apache HTTP Server for Node.js applications
    • Docker (Single Container, Multicontainer, Pre-configured Docker)
    • Java SE
    • GO

I hope this article has received well with all of you guys. It will definitely help you to get on and get started with the AWS Journey and I will definitely try to keep posting often and make sure that you enjoy while learning the things and getting it done.

Till then Stay tuned for the next one. I hope you are having a good day !

Every Feedback is appreciated it will help me to get better and deliver you guys a great content.

Did you find this article valuable?

Support Aditya Dhopade by becoming a sponsor. Any amount is appreciated!