Serverless + JSKieran (Kio) Goodary
10 Years
Before we continue…
“server”
We’re talking your classic web server
This presentation is a little…
AWS-esque
Root Server
Time
Sanity
Cost
Time
Sanity
Cost
IaaSInfrastructure as a Service
Time
Sanity
Cost
PaaSPlatform as a Service
Time
Sanity
Cost
Serverless
Deploys in seconds
20
Multipurpose usage
Minimal configuration
EnvironmentConfigured
InfinitelyScalable
FaultTolerant
EdgeLocations
You’ll probably never get charged
Billed every 100ms
First 3.2 million seconds are free, every month
every 100ms costs $0.000000208
Serverless Framework
CLI-driven Multiple LanguageSupport
Multiple PlatformSupport
Well Funded Strong CommunityUsesCloudFormation
npm install serverless -gsls create —-template aws-nodejs —-path create /create
/create/serverless.yml
/create/handler.js
events:- http:
path: users/create
method: post- sns: federation-identity-sign-up- s3: user-profile-mugshots
module.exports.hello = (event, context, callback) => { const response = { statusCode: 200, body: JSON.stringify({ message: 'Go Serverless v1.0! Your function executed successfully!', input: event, }), }; callback(null, response);};
sls deploy
Serverless: Packaging service...Serverless: Uploading CloudFormation file to S3...Serverless: Uploading service .zip file to S3 (25.62 KB)...Serverless: Updating Stack...Serverless: Checking Stack update progress.................Serverless: Stack update finished...Serverless: Removing old service versions...Service Informationservice: createstage: devregion: us-east-1api keys: Noneendpoints: POST - https://09u3jupt76.execute-api.us-east-1.amazonaws.com/dev/createfunctions: create-dev-hello: arn:aws:lambda:us-east-1:305311140082:function:create-dev-hello
😄That’s it.
It is literally that easy.
Show ‘em that tingjsonb.in
0servers used
jsonb.in
Route 53
CloudFront Distribution
S3 Bucket (Site Assets)
React App
create
read
update
S3 Bucket (Site Data)
👍🏾👌🏾Thank you!
Do not follow me on Twitter:@kiog
digitalindustria.com
Top Related