Serverless Framework For “Function-As-A-Service”

2021.03.25

What Is Serverless?

Serverless computing is a method of providing backend services on an as-used basis. A serverless provider allows users to write and deploy code without the hassle of worrying about the underlying infrastructure. A company that gets backend services from a serverless vendor is charged based on Note that despite the name serverless, physical servers are still used but developers do not need to be aware of them.

What is Serverless Framework?

Build applications sintered of microservices that run in response to events, auto-scale for you, and only charge you when they run. This lowers the total cost of maintaining your apps, enabling you to build more logic, faster.

The Framework uses new event-driven compute services, like AWS Lambda, Google Cloud Functions, and more. It's a command-line tool, providing scaffolding, workflow automation and best practices for developing and deploying your serverless architecture. It's also completely extensible via plugins. .. its open source

Click here! for git repository 

Click here! For serverless, inc

Why Serverless Framework?

I've  used it and find it very easy to understand and is extremely flexible with its plugin model  

If we use the AWS Console or CLI to manage and deploy your serverless app, here is a taster of some issues you can expect to spend time resolving ...

  • Working out what IAM permissions you need to invoke your function and integrate it with triggering or downstream services
  • Jumping through hoops to set up API Gateway with Lambda to act as a simple REST API
  • Manually zipping your Lambda code and package dependencies
  • Setting up dead letter queues (and requisite IAM permissions) for failed Lambda invocations
  • Coming up with your approach for managing environment-specific configuration
  • Debugging CORS issues when invoking your API Gateway
  • Connecting your Lambda to a VPC

Lets Build our first app ("Yes it is Hello World"):

  • Installing Serverless in your local machine

npm install -g serverless

  • Connecting to aws

serverless config credentials --provider aws --key <your access key> --secret <your secret key>

  • creating Serverless application

sls create --template hello-world

  • Deploying serverless application:

sls deploy

click here! for tutorials

Are there any substitute for Serverless framework:

yes there are quite a few you can find a comparison in below link

click here! for comparison

Conclusion:

I have tried to explain the serverless framework and how can we use it for building awsm application and making our life easier.

hope you all try and build something amazing