%title: Introduction to Serverless Framework %author: techgaun %date: 2020-04-12
An introduction to Serverless Framework
- Introduction to Serverless Architecture
- Introduction to Open-Source Serverless Framework
- Quickstart
- Language Support
- Services
- Extending Serverless Framework with plugins
- Serverless Framework Components
- Build a Live Demo
- Use Cases
- Key concepts and taking from dev to production
- Challenges of Serverless Architecture
- Discussions/Wrap-up/Stories
- Microservice-y architecture for which you don't have to manage the infrastructure
- Infrastructure often abstracted away into simple configuration by Cloud Providers (AWS Lambda, Azure functions, Google CloudFunctions, etc.) or your in-house infrastructure team (With deployment of Apache OpenWhisk, Kubeless, Fission, etc.)
- Lowers the total cost of maintaining your apps, enabling you to build more logic, faster
- Serverless compute services are essentially ephemeral containers. No need to worry about things such as CPU, memory, disk, OS/app updates, n/w configs, container configs, k8s, and plethoras of such things...
- MIT open-source project, actively maintained by a full-time, venture-backed team, started in 2015
- Infrastructure as Code for various managed services necessary to get up and running with serverless architecture
- Supports Node.js, Python, Java, Go, C#, Ruby, Swift, Kotlin, PHP, Scala, & F#
- Manages the lifecycle of your serverless architecture (build, deploy, update, delete)
- Safely deploy functions, events and their required resources together via provider resource managers (e.g., AWS CloudFormation).
- Infrastructure abstraction sounds nice in theory, in practice, managing layers on top of that abstraction in a simple and unified way becomes fragile and so comes serverless framework for the rescue.
- Easy scaffolding, built-in support for stages, functions group (aka serverless services), easy to build CI/CD workflows and extensible via plugin system. Finally a big community
npm install -g serverlessorcurl -o- -L https://slss.io/install | bashserverlessorslsfor running serverlesssls create -t aws-nodejs -p <app_name>- serverless.yml for configuration
- Depends on what is supported by the runtime of the service
- AWS Lambda integration is probably by far the most feature complete and mature on serverless framework
sls install --url <service-github-url>- provides a mechanism to build and re-use scaffolding/templates
- examples and much more
Extending Serverless Framework with plugins
- allows users to extend or overwrite the framework's core functionality
- plugins are basically javascript code
- power of serverless lies a lot in the rich plugin ecosystem and extensibility
- install (via npm/yarn) and specify plugins you like to use on serverless.yml in plugins sections
- plugins dive
- How to create serverless plugins - Part 1
- abstractions to deploy serverless applications using serverless framework
- allows complex but common use-cases to be built out and made available via serverless registry
- just got out of beta recently
- From scratch
- Using template
- Using service
- Auto-scaling Websites and APIs
- Image and Video (& General Files/Multimedia) Manipulation
- Event Processing
- Multi-language and Multi-cloud applications
- Complex shared client-side logic encapsulation
- Case Studies
- API Gateway
- Stages
- IAM
- Logging
- Lack of operational tools (monitoring, debugging, observability)
- Architectural and Testing complexity
- Vendor lock-in
- Security Management
- General startup latency (cold boot time)