Evolution of Web Infrastructure
IaaS
Infrastructure as a Service



FaaS
Function as a Service
What is Serverless?
Servers are completely abstracted from the developer
The billing is based on the consumption and executions of functions, not server instance
Event-driven and instantaneously scalable
Platforms and Technologies
AWS Lambda

Google Cloud Functions

OpenWhisk
OpenFaas






Demo
Create Account on AWS
Install Serverless CLI
sudo npm install serverless -gCreate Serverless Project
mkdir serverless
cd serverless
serverless create -t aws-nodejsAWS Access Key
4
serverless config credentials --provider aws --key <your-aws-key> --secret <your-aws-secret>
Create a Function
4
// handler.js
'use strict';
module.exports.hello = async (event, context) => {
return {
statusCode: 200,
body: JSON.stringify({
message: 'Hello World!',
input: event,
}),
};
};Deploy
4
serverless deployDiscover Serverless
By Johnny Hall
Discover Serverless
- 181