Serverless is a term used to describe the services, practices, and methods that allow you to create more agile apps that allow you to adapt and react to change more quickly. It encourages one to think less about the servers by omitting various tasks involving clusters and servers. Basically in layman language usage of serverless computing will result in
No efforts required to maintain or provision any servers, also no software or runtime to install or maintain.
Pay for only consistent throughput or execution duration instead by server unit.
Serverless have in-built availability and fault tolerance. User need not architect for these capabilities since the services running the application provide them by default.
It manages all the services that a user can use to build and run its program on AWS's system. It handles all the back end tasks like computing, databases, storage, processing and many more, this in result, allows the user to focus on his program and allows him to innovate.
Developer tooling using different tools and services.
Security & Access Control using its Identity and Access Management
What are the pros and cons of it?
A boon as it helps a developer to focus all his power into developing rather than worrying anything about deploying and managing servers. It can be used to run or build any modern application and increases agility whereas at the same time helps to lower the cost of your product.
Pros of AWS Serverless Computing
Servers need no attention for installation and maintenance.
Payment is as per the throughput, making it value for money.
You can choose appropriate settings as per your products requirement, thus paying only for the functions you use.
Serverless provides you with many beneficial architects that are built-in and are provided to you by default.
It helps the developer to focus only on the code thus giving him ample time to innovate the program or to interact with customers to get customer feedbacks thus increasing time to market.
You can write code, and when you're finished with everything, you can straightaway deploy the system, and it'll be available to the world within a few minutes. Thus no need to put any effort into or for creating and managing servers.
Cons of AWS Serverless Computing
Serverless Architecture executes commands and functions on temporarily created containers. So if a client performs few tasks on your app, the serverless architecture will create a temporary box and will destroy it as soon as the client is done performing tasks, this results in delays which are also known as cold start.
As serverless architecture is based on the temporarily created containers, the usable memory is thus limited hindering the processes that require a lot of processing.
Another issue with Lambda is that it decides which third-party apps can be used to work on it, thus giving up a lot of control over your application.
Currently, Lambda provides with 1000 concurrent executions, all across its account the limit is same. If the user tries to load test while using the same account for both production and analysis, this will result in DoS state (Denial of Service).
Monitoring and Debugging are quite restrictive to what the vendor provides. It is fundamental with Lambda too. It lacks proper operational tools for monitoring and debugging.
Running an application that runs 24*7 can be expensive on serverless that running the same form over server-based cloud system.
Lack of local testing options
As the serverless application grows, complexity to troubleshooting also increases, because of the way it is designed.
AWS Serverless Computing Architecture is a way to build and run services and applications without having to manage infrastructure. Users application still runs on servers, but servers are managed by it. It is a method that provides with support for back-end services. Users are charged based on their computation, and nothing else is charged for only the services used. Though these are called serverless but physical servers are still used, but developers don't have to get the knowledge of it. It offers Function-as-a-Service (FaaS).
Why to use its architecture?
It provides with various advantages over traditional server-centric or cloud-based infrastructure. It offers developers with greater scalability, quick time to release, more flexibility and all this at a reduced cost as the user pays only for the services used. A developer can focus on their core product instead of juggling between managing and operating servers or run times and developing the application. It helps decrease latency.
Serverless Automated Deployment
User can easily make a serverless application with an automated deployment pipeline from the AWS Lambda console. Its services integrated with SAM are used to automate deployments. SAM helps deploy new versions of Lambda function and automatically creates aliases that point to the latest version. If gradual rollouts are enabled through SAM, a CodeDeploy resource is automatically created for the user.
Serverless Authentication with JSON Web Tokens
Authentication - It determines if the client's credentials are valid or not.Authorization – It determines what functions a client can perform. The privileges might be different for different clients.
JSON Web Tokens (JWT)
This is a compact and self-contained way for securely transmitting the information. It is a string that consists of 3 components separated by "." character. Lambda uses a Lambda authorizer, and it is an API Gateway feature. It uses Lambda functions to control access to users API. There are two types of Authorizers:-
It can be accessed by following types of identities:
AWS account root user
Account root user
It helps manage roles, users and policies.
The root user can create, disable or delete access keys.
Can also change the root password.
It has access to all the resources provided by it.
Can create policies
Policies can't be used within the account to deny access to the root user.
If the root user gets hacked, his security could be jeopardized.
Improves user experience.
Enhances security profiles.
Simplifies Auditing and Reporting.
Allows easy access.
Helps increase productivity and reduce IT costs
Doesn't have access to all the resources, only to the funds that the root user provides access to.
Unable to make policies if not given access for.
Restricted to use the resources for which permission has been granted or for which access has been provided
What are the services for Serverless Computing?
There are various Services for AWS Serverless Computing few of them are listed below:
Serverless Computation Services
AWS Serverless provides Lambda that lets the user run code without managing servers, and the user only pays for the computations used.Lambda Edge allows user to run Lambda functions at edge locations in response to events of Amazon CloudFront fargate is a serverless compute engine built for containers. It helps scale and manage the infrastructure required to run the user's box.
Amazon S3 provides a developing team with durable, secure and highly-scalable object storage. It's easy to use and portableAmazon EFS provides pure, scalable, elastic file storage. It's self-adjusting and grows and shrink as per the user's demand.
Serverless Data Store Services
It provides with Amazon DynamoDB, which is a fast and flexible No-SQL database service for all applications; it needs millisecond latency at any scale.
Amazon Aurora Serverless – It is an on-demand (MySQL-compatible system) auto-scaling configuration. In this database will automatically start-up and shut down. The system will scale according to the user's application's needs.
API Proxy Services
Amazon API Gateway - It's a fully managed service that makes the task easy for developers to create, maintain, publish, monitor and secure APIs at any scale. Gateways allow you to process thousands of concurrent API calls and helps the user to handle traffic management, authorization and access control, monitoring, and API version management.
Application Integration Services
Amazon SNS – It is a fully managed pub/sub messaging services that help decouple and scale microservices, distributed systems and serverless applications.
Amazon SQS – It is a fully managed messaging services that help decouple and scale microservices, distributed systems and serverless applications.
AWS AppSync – It helps simplifying application development by letting you create a flexible GraphQL API, it helps secure access, manipulation and combines data from one or more data sources.
Amazon EventBridge – It is an event bus service for it which helps to make access application data easy from many sources and send it into the user's AWS environment.
AWS Step Functions – Zit helps to make it easy to coordinate the components of distributed applications and microservices; it uses visual workflows for the same.
Amazon Kinesis – It is used to stream data on AWS. Kinesis offers great services to help load and analyze the streaming data.
Amazon Athena – It is a service that's interactive and makes it easy to analyze the data in Amazon S3 using standard SQL. Athena is serverless.
Developer Tooling Services
It provides with tools and services that help developers in the serverless application development process. It offers many more tools like tools for continuous integration, delivery, testing, deployments, monitoring and diagnostics, SDKs, frameworks, and integrated development environment(IDE) plugins.
Listed below are the major differences in AWS vs Google Cloud vs Azure
Lambda is better than others as a programming language is quite diverse and Lambda provides with more version and more types of supported languages than other serverless architecture providers.
Stateful Functions Support
AWS Lambda does not provide with this support, but it can access the AWS storage services where Azure provides this feature, and Google Cloud has no such element as of now.
IAM policies can be attached to Lambda. Whereas RBAC is supported at Subscription and Functions are inside in Azure. Google Cloud has not publicly released anything related to this.
It uses S3 & DynamoDB for complete stateless persistent storage whereas in Azure Environment variables can be set so that it can be used in functions, Azure stores in blob storage. Google Cloud provides with Cloud Storage, Cloud Datastore, Cloud SQL for the same.
Its deployment is done in zip format. The zip is uploaded to Lambda/S3. Whereas in Azure Git, dropbox, visual studio, Kudu console etc. can be used for deployment. In Google Cloud CLI, Zip upload, Cloud Storage or Source and inline web editor are used for the purpose.
Maximum number of functions
In AWS Serverless and Azure Serverless, there's no limit on a maximum number of functions whereas in google the limit is up to 1000 per project.