SlideShare a Scribd company logo
GOING SERVERLESS
DO SERVER-SIDE BETTER BY
DO SERVER-SIDE BETTER BY GOING SERVERLESS
OVERVIEW - OUTLINE
▸ What’s all the hype about serverless architectures?
▸ Focus on Node.js, AWS Lambda, & Serverless Framework
▸ Discuss the advantages, disadvantages & limitations of a
serverless architecture
DO SERVER-SIDE BETTER BY GOING SERVERLESS
OVERVIEW - TAKEAWAYS
▸ General understanding of
▸ Serverless Architectures
▸ Node.js
▸ AWS Lambda
▸ Serverless Framework
▸ The value they provide
DO SERVER-SIDE BETTER BY GOING SERVERLESS
ABOUT ME
▸ Jason Sich
▸ Software Developer at
ClickFunnels.com
▸ Experience in JavaScript, Node.js,
AWS, & Serverless Framework
▸ Not the best
DO SERVER-SIDE BETTER BY GOING SERVERLESS
SERVERLESS ARCHITECTURE - SUCH HYPE
▸ News & Social Media (Hacker News, Lobsters, Twitter
▸ Conferences (Serverless Conf US/London)
▸ Libraries/Frameworks (Serverless Framework, Apex,
Chalice, Zappa)
▸ AWS Flourish (Swagger for Lambda/API Gateway?)
DO SERVER-SIDE BETTER BY GOING SERVERLESS
SERVERLESS ARCHITECTURE - WHAT IS IT?
▸ Functions as a Service
▸ “custom code that’s run in ephemeral containers” - Mike
Roberts via martinfowler.com/articles/serverless.html
▸ Tightly coupled to providers infrastructure components
▸ e.g. API Gateway, S3
▸ Provides an easy integration point for providers
DO SERVER-SIDE BETTER BY GOING SERVERLESS
SERVERLESS ARCHITECTURE - WHAT’S SO COOL ABOUT IT?
▸ Pay for what you need
▸ Easily scales
▸ Don’t have to manage servers!
▸ Easy deployment
DO SERVER-SIDE BETTER BY GOING SERVERLESS
NODE.JS
▸ nodejs.org
DO SERVER-SIDE BETTER BY GOING SERVERLESS
NODE.JS - WHAT IS IT?
▸ JavaScript runtime built on V8 engine
▸ Node.js is not exclusive, but is pervasive
▸ AWS Lambda
▸ Azure Functions
▸ Google Cloud Functions
▸ iron.io
DO SERVER-SIDE BETTER BY GOING SERVERLESS
NODE.JS - WHAT’S COOL ABOUT IT?
▸ Event-driven, non-blocking I/O model
▸ Callbacks, Promises, Async/Await
▸ Typical use-cases for Serverless
▸ Scripted & Dynamic
▸ REPL
▸ Lots of existing libraries & tooling (aws-sdk)
DO SERVER-SIDE BETTER BY GOING SERVERLESS
NODE.JS - USAGE
▸ JavaScript is Ubiquitous (Server/Web Client/Mobile)
▸ Big companies using Node.js
▸ Walmart
▸ Uber
▸ PayPal
▸ Netflix
DO SERVER-SIDE BETTER BY GOING SERVERLESS
AWS LAMBDA - WHAT IS IT?
▸ Amazon’s AWS FaaS product
DO SERVER-SIDE BETTER BY GOING SERVERLESS
AWS LAMBDA - FEATURES
▸ Pay by millisecond
▸ Horizontal Scaling
▸ Supports Node.js, Python, & Java (JVM Languages)
▸ No need to manage servers
▸ More flexible than PaaS
▸ Run Binaries, Temp Files, …
DO SERVER-SIDE BETTER BY GOING SERVERLESS
AWS LAMBDA - THE WHOLE CLOUD (AT LEAST AMAZONS)
▸ API Gateway
▸ IoT
▸ Kinesis
▸ DynamoDB
▸ S3
▸ Cloud Watch
▸ Alexa
▸ CodeCommit
▸ SNS
▸ MORE…
DO SERVER-SIDE BETTER BY GOING SERVERLESS
AWS LAMBDA - CONFIGURATION TOOLS
▸ AWS Web Console
▸ CloudFormation
▸ AWS CLI
▸ AWS SDK
DO SERVER-SIDE BETTER BY GOING SERVERLESS
AWS LAMBDA - CONFIGURATION OPTIONS
▸ Runtime Support (Node, Java, Python)
▸ Memory
▸ 1536 MB max
▸ Timeout
▸ 5 minutes max
▸ Triggers
DO SERVER-SIDE BETTER BY GOING SERVERLESS
AWS LAMBDA - CODE
▸ Inline coding using online editor
▸ S3 Zip
▸ Gotta package dependencies too
DO SERVER-SIDE BETTER BY GOING SERVERLESS
AWS LAMBDA - DEPLOYMENT
▸ Qualifiers
▸ Aliases (Prod, Stage, Dev, whatever…)
▸ Versions
DO SERVER-SIDE BETTER BY GOING SERVERLESS
AWS LAMBDA - INVOCATION
▸ AWS Web Console
▸ Event from Trigger Source
▸ AWS SDK
▸ Apps & other Lambdas
▸ API Gateway Endpoints
▸ Wizard!
DO SERVER-SIDE BETTER BY GOING SERVERLESS
AWS LAMBDA - OBSERVATION
▸ Debugging
▸ ¯_(ツ)_/¯
▸ Logging
▸ CloudWatch Logs
▸ Monitoring
▸ CloudWatch Metrics, Alarms & Dashboards
DO SERVER-SIDE BETTER BY GOING SERVERLESS
SERVERLESS FRAMEWORK
▸ www.serverless.com
▸ CLI tool to create & manage Serverless Projects
DO SERVER-SIDE BETTER BY GOING SERVERLESS
SERVERLESS FRAMEWORK - FUN FACTS
▸ Just hit v1.0
▸ $3 million in funding
▸ Source is Open
▸ Supports Node.js, Python, Java & More
▸ Other platforms than AWS coming soon (Serverless
Platform is in beta)
DO SERVER-SIDE BETTER BY GOING SERVERLESS
SERVERLESS FRAMEWORK - WHY?
▸ Helps organize & manage a serverless project
▸ Lambda creation, configuration & deployment
▸ AWS resource management via CloudFormation stacks
▸ Setup of Lambdas to Events & Resources
▸ Project structure by Services
DO SERVER-SIDE BETTER BY GOING SERVERLESS
SERVERLESS FRAMEWORK - CONCEPTS
▸ Service
▸ Framework’s unit of organization (like a project)
▸ Defines the Functions along with the Events & Resources
they use
DO SERVER-SIDE BETTER BY GOING SERVERLESS
SERVERLESS FRAMEWORK - CONCEPTS
▸ Function
▸ AWS Lambda Function
▸ Can be independently deployed
▸ Should do a single thing (separate concerns)
DO SERVER-SIDE BETTER BY GOING SERVERLESS
SERVERLESS FRAMEWORK - CONCEPTS
▸ Resources
▸ AWS infrastructure components
▸ DynamoDB Table
▸ S3 Buckets
▸ SNS Topics
▸ Anything defined by CloudFormation
DO SERVER-SIDE BETTER BY GOING SERVERLESS
SERVERLESS FRAMEWORK - CONCEPTS
▸ Events
▸ Anything that triggers an AWS Lambda Function to
execute
▸ ex: S3 Bucket Upload, CloudWatch Timer, …
DO SERVER-SIDE BETTER BY GOING SERVERLESS
SERVERLESS FRAMEWORK - CLI
$ serverless create --template aws-nodejs --path foo
$ cd foo
$ serverless deploy -v
$ serverless deploy function -f bar
$ serverless invoke -f bar -p ./event.json -l
$ serverless logs -f bar -t
DO SERVER-SIDE BETTER BY GOING SERVERLESS
SERVERLESS FRAMEWORK - CONFIGURATION
service: example
provider:
name: aws
stage: dev
region: us-east-1
runtime: nodejs4.3
memorySize: 128
timeout: 30
iamRoleStatements:
- Effect: "Allow"
Action:
- "lambda:InvokeFunction"
- 's3:PutObject'
- 's3:GetObject'
Resource: “*"
DO SERVER-SIDE BETTER BY GOING SERVERLESS
SERVERLESS FRAMEWORK - CONFIGURATION
functions:
echo:
handler: foo/index.handler
events:
- stream: arn:aws:dynamodb:region:xxx:table/foo/stream/…
resources:
Resources:
fooTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: fooTable
KeySchema:
- AttributeName: baz
DO SERVER-SIDE BETTER BY GOING SERVERLESS
ALL TOGETHER NOW - THE GOOD
▸ Node.js
▸ Event-driven I/O model
▸ Ubiquitous
▸ Prevalent
DO SERVER-SIDE BETTER BY GOING SERVERLESS
ALL TOGETHER NOW - THE GOOD
▸ AWS Lambda
▸ Pay per millisecond
▸ No servers to manage
▸ Fairly flexible (binaries, temp files, …)
DO SERVER-SIDE BETTER BY GOING SERVERLESS
ALL TOGETHER NOW - THE GOOD
▸ Serverless Framework
▸ Serverless management from the command line
▸ Gives structure/conventions to FaaS project
▸ Stays out of your way during coding
DO SERVER-SIDE BETTER BY GOING SERVERLESS
ALL TOGETHER NOW - THE BAD
▸ Node.js
▸ Language & ecosystem are evolving quickly
▸ Async first
▸ Lacking standard library
DO SERVER-SIDE BETTER BY GOING SERVERLESS
ALL TOGETHER NOW - THE BAD
▸ AWS lambda limits
DO SERVER-SIDE BETTER BY GOING SERVERLESS
ALL TOGETHER NOW - THE BAD
▸ AWS lambda limits
DO SERVER-SIDE BETTER BY GOING SERVERLESS
ALL TOGETHER NOW - THE BAD
▸ AWS lambda limits
DO SERVER-SIDE BETTER BY GOING SERVERLESS
ALL TOGETHER NOW - THE BAD
▸ AWS lambda
▸ Node v4.3
▸ Cold Start Time
▸ Response Times
▸ API Gateway, CloudFront Distribution, Lambda
▸ AWS Web Console is not fun to use
DO SERVER-SIDE BETTER BY GOING SERVERLESS
ALL TOGETHER NOW - THE BAD
▸ AWS Lambda
▸ Debugging can be hard
▸ Statelessness
▸ Resource usage spikes
▸ Vendored dependencies
DO SERVER-SIDE BETTER BY GOING SERVERLESS
ALL TOGETHER NOW - THE BAD
▸ Serverless Framework
▸ Evolving quickly JAWS -> SF v0.5 -> SF v1.0
▸ May not play well with other infrastructure tools
▸ New, needs maturity
DO SERVER-SIDE BETTER BY GOING SERVERLESS
MORAL OF THE STORY
▸ Great if you are planning to AWS
▸ Can be cost effective vs running & managing a server
▸ Awesome for event handling
DO SERVER-SIDE BETTER BY GOING SERVERLESS
THE END
▸ Questions?
▸ Twitter: @jasich, @grdevnight
▸ Slides will get posted there

More Related Content

What's hot (20)

PDF
Gitlab, GitOps & ArgoCD
Haggai Philip Zagury
 
PPTX
Introduction to AWS VPC, Guidelines, and Best Practices
Gary Silverman
 
PPTX
3. 마이크로 서비스 아키텍쳐
Terry Cho
 
PDF
Introduction to Google Cloud Platform
Sujai Prakasam
 
PDF
AWS Lambda 내부 동작 방식 및 활용 방법 자세히 살펴 보기 - 김일호 솔루션즈 아키텍트 매니저, AWS :: AWS Summit ...
Amazon Web Services Korea
 
PPTX
Introduce AWS Lambda for newbie and Non-IT
Chitpong Wuttanan
 
PDF
Grafana introduction
Rico Chen
 
PPTX
Azure migration
Arnon Rotem-Gal-Oz
 
PDF
GitOps and ArgoCD
Omar Fathy
 
PPTX
Introduction to Amazon Web Services by i2k2 Networks
i2k2 Networks (P) Ltd.
 
PPTX
Aws VPC
Abhishek Amralkar
 
PDF
Ansible
Vishal Yadav
 
PDF
Monitor every app, in every stage, with free and open Elastic APM
Elasticsearch
 
PPSX
Microservices Architecture - Cloud Native Apps
Araf Karsh Hamid
 
PDF
[오픈소스컨설팅] 서비스 메쉬(Service mesh)
Open Source Consulting
 
PDF
아키텍처 현대화 분야 신규 서비스 - 주성식, AWS 솔루션즈 아키텍트 :: AWS re:Invent re:Cap 2021
Amazon Web Services Korea
 
PPTX
Microsoft Azure Technical Overview
gjuljo
 
PPTX
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
NGINX, Inc.
 
PPTX
MySQL Monitoring using Prometheus & Grafana
YoungHeon (Roy) Kim
 
PPTX
Everything You Need To Know About Persistent Storage in Kubernetes
The {code} Team
 
Gitlab, GitOps & ArgoCD
Haggai Philip Zagury
 
Introduction to AWS VPC, Guidelines, and Best Practices
Gary Silverman
 
3. 마이크로 서비스 아키텍쳐
Terry Cho
 
Introduction to Google Cloud Platform
Sujai Prakasam
 
AWS Lambda 내부 동작 방식 및 활용 방법 자세히 살펴 보기 - 김일호 솔루션즈 아키텍트 매니저, AWS :: AWS Summit ...
Amazon Web Services Korea
 
Introduce AWS Lambda for newbie and Non-IT
Chitpong Wuttanan
 
Grafana introduction
Rico Chen
 
Azure migration
Arnon Rotem-Gal-Oz
 
GitOps and ArgoCD
Omar Fathy
 
Introduction to Amazon Web Services by i2k2 Networks
i2k2 Networks (P) Ltd.
 
Ansible
Vishal Yadav
 
Monitor every app, in every stage, with free and open Elastic APM
Elasticsearch
 
Microservices Architecture - Cloud Native Apps
Araf Karsh Hamid
 
[오픈소스컨설팅] 서비스 메쉬(Service mesh)
Open Source Consulting
 
아키텍처 현대화 분야 신규 서비스 - 주성식, AWS 솔루션즈 아키텍트 :: AWS re:Invent re:Cap 2021
Amazon Web Services Korea
 
Microsoft Azure Technical Overview
gjuljo
 
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
NGINX, Inc.
 
MySQL Monitoring using Prometheus & Grafana
YoungHeon (Roy) Kim
 
Everything You Need To Know About Persistent Storage in Kubernetes
The {code} Team
 

Similar to Serverless presentation (20)

PDF
Introduction to Serverless Computing - OOP Munich
Boaz Ziniman
 
PDF
Run Code, Not Servers: AWS Lambda
Özgür Çiçek
 
PDF
Serverless: A love hate relationship
Jürgen Brüder
 
PPTX
Going Serverless with AWS Lambda at ReportGarden
Jay Gandhi
 
PDF
The future will be Serverless - JSDay Verona 2018
Luciano Mammino
 
PPTX
Primeros pasos en desarrollo serverless
javier ramirez
 
PPTX
awslambda-240508203904-07xsds253491.pptx
FarooqKhurshid1
 
PDF
Designing Serverless Architectures on AWS
Rajitha Pathiraja
 
PDF
Building serverless apps with Node.js
Julien SIMON
 
PDF
Serverless Node.js
The Software House
 
PDF
Čtvrtkon #64 - AWS Serverless - Michal Haták
Ctvrtkoncz
 
PDF
The future will be Serverless (FrontConf Munich 2017)
Luciano Mammino
 
PDF
Serverless cecilia.cho
Cecilia Cho
 
PDF
Mainstream Serverless
Dhaval Nagar
 
PDF
20200803 - Serverless with AWS @ HELTECH
Marcia Villalba
 
PDF
Microservices and Serverless for Mega Startups - DevOps IL Meetup
Boaz Ziniman
 
PPTX
Serverless at Lifestage
BATbern
 
PPTX
Introduction To AWS & AWS Lambda
An Nguyen
 
PDF
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
Dhaval Nagar
 
PDF
Introducing to serverless computing and AWS lambda - Israel Clouds Meetup
Boaz Ziniman
 
Introduction to Serverless Computing - OOP Munich
Boaz Ziniman
 
Run Code, Not Servers: AWS Lambda
Özgür Çiçek
 
Serverless: A love hate relationship
Jürgen Brüder
 
Going Serverless with AWS Lambda at ReportGarden
Jay Gandhi
 
The future will be Serverless - JSDay Verona 2018
Luciano Mammino
 
Primeros pasos en desarrollo serverless
javier ramirez
 
awslambda-240508203904-07xsds253491.pptx
FarooqKhurshid1
 
Designing Serverless Architectures on AWS
Rajitha Pathiraja
 
Building serverless apps with Node.js
Julien SIMON
 
Serverless Node.js
The Software House
 
Čtvrtkon #64 - AWS Serverless - Michal Haták
Ctvrtkoncz
 
The future will be Serverless (FrontConf Munich 2017)
Luciano Mammino
 
Serverless cecilia.cho
Cecilia Cho
 
Mainstream Serverless
Dhaval Nagar
 
20200803 - Serverless with AWS @ HELTECH
Marcia Villalba
 
Microservices and Serverless for Mega Startups - DevOps IL Meetup
Boaz Ziniman
 
Serverless at Lifestage
BATbern
 
Introduction To AWS & AWS Lambda
An Nguyen
 
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
Dhaval Nagar
 
Introducing to serverless computing and AWS lambda - Israel Clouds Meetup
Boaz Ziniman
 
Ad

Recently uploaded (20)

PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PPTX
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PPTX
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Ad

Serverless presentation

  • 2. DO SERVER-SIDE BETTER BY GOING SERVERLESS OVERVIEW - OUTLINE ▸ What’s all the hype about serverless architectures? ▸ Focus on Node.js, AWS Lambda, & Serverless Framework ▸ Discuss the advantages, disadvantages & limitations of a serverless architecture
  • 3. DO SERVER-SIDE BETTER BY GOING SERVERLESS OVERVIEW - TAKEAWAYS ▸ General understanding of ▸ Serverless Architectures ▸ Node.js ▸ AWS Lambda ▸ Serverless Framework ▸ The value they provide
  • 4. DO SERVER-SIDE BETTER BY GOING SERVERLESS ABOUT ME ▸ Jason Sich ▸ Software Developer at ClickFunnels.com ▸ Experience in JavaScript, Node.js, AWS, & Serverless Framework ▸ Not the best
  • 5. DO SERVER-SIDE BETTER BY GOING SERVERLESS SERVERLESS ARCHITECTURE - SUCH HYPE ▸ News & Social Media (Hacker News, Lobsters, Twitter ▸ Conferences (Serverless Conf US/London) ▸ Libraries/Frameworks (Serverless Framework, Apex, Chalice, Zappa) ▸ AWS Flourish (Swagger for Lambda/API Gateway?)
  • 6. DO SERVER-SIDE BETTER BY GOING SERVERLESS SERVERLESS ARCHITECTURE - WHAT IS IT? ▸ Functions as a Service ▸ “custom code that’s run in ephemeral containers” - Mike Roberts via martinfowler.com/articles/serverless.html ▸ Tightly coupled to providers infrastructure components ▸ e.g. API Gateway, S3 ▸ Provides an easy integration point for providers
  • 7. DO SERVER-SIDE BETTER BY GOING SERVERLESS SERVERLESS ARCHITECTURE - WHAT’S SO COOL ABOUT IT? ▸ Pay for what you need ▸ Easily scales ▸ Don’t have to manage servers! ▸ Easy deployment
  • 8. DO SERVER-SIDE BETTER BY GOING SERVERLESS NODE.JS ▸ nodejs.org
  • 9. DO SERVER-SIDE BETTER BY GOING SERVERLESS NODE.JS - WHAT IS IT? ▸ JavaScript runtime built on V8 engine ▸ Node.js is not exclusive, but is pervasive ▸ AWS Lambda ▸ Azure Functions ▸ Google Cloud Functions ▸ iron.io
  • 10. DO SERVER-SIDE BETTER BY GOING SERVERLESS NODE.JS - WHAT’S COOL ABOUT IT? ▸ Event-driven, non-blocking I/O model ▸ Callbacks, Promises, Async/Await ▸ Typical use-cases for Serverless ▸ Scripted & Dynamic ▸ REPL ▸ Lots of existing libraries & tooling (aws-sdk)
  • 11. DO SERVER-SIDE BETTER BY GOING SERVERLESS NODE.JS - USAGE ▸ JavaScript is Ubiquitous (Server/Web Client/Mobile) ▸ Big companies using Node.js ▸ Walmart ▸ Uber ▸ PayPal ▸ Netflix
  • 12. DO SERVER-SIDE BETTER BY GOING SERVERLESS AWS LAMBDA - WHAT IS IT? ▸ Amazon’s AWS FaaS product
  • 13. DO SERVER-SIDE BETTER BY GOING SERVERLESS AWS LAMBDA - FEATURES ▸ Pay by millisecond ▸ Horizontal Scaling ▸ Supports Node.js, Python, & Java (JVM Languages) ▸ No need to manage servers ▸ More flexible than PaaS ▸ Run Binaries, Temp Files, …
  • 14. DO SERVER-SIDE BETTER BY GOING SERVERLESS AWS LAMBDA - THE WHOLE CLOUD (AT LEAST AMAZONS) ▸ API Gateway ▸ IoT ▸ Kinesis ▸ DynamoDB ▸ S3 ▸ Cloud Watch ▸ Alexa ▸ CodeCommit ▸ SNS ▸ MORE…
  • 15. DO SERVER-SIDE BETTER BY GOING SERVERLESS AWS LAMBDA - CONFIGURATION TOOLS ▸ AWS Web Console ▸ CloudFormation ▸ AWS CLI ▸ AWS SDK
  • 16. DO SERVER-SIDE BETTER BY GOING SERVERLESS AWS LAMBDA - CONFIGURATION OPTIONS ▸ Runtime Support (Node, Java, Python) ▸ Memory ▸ 1536 MB max ▸ Timeout ▸ 5 minutes max ▸ Triggers
  • 17. DO SERVER-SIDE BETTER BY GOING SERVERLESS AWS LAMBDA - CODE ▸ Inline coding using online editor ▸ S3 Zip ▸ Gotta package dependencies too
  • 18. DO SERVER-SIDE BETTER BY GOING SERVERLESS AWS LAMBDA - DEPLOYMENT ▸ Qualifiers ▸ Aliases (Prod, Stage, Dev, whatever…) ▸ Versions
  • 19. DO SERVER-SIDE BETTER BY GOING SERVERLESS AWS LAMBDA - INVOCATION ▸ AWS Web Console ▸ Event from Trigger Source ▸ AWS SDK ▸ Apps & other Lambdas ▸ API Gateway Endpoints ▸ Wizard!
  • 20. DO SERVER-SIDE BETTER BY GOING SERVERLESS AWS LAMBDA - OBSERVATION ▸ Debugging ▸ ¯_(ツ)_/¯ ▸ Logging ▸ CloudWatch Logs ▸ Monitoring ▸ CloudWatch Metrics, Alarms & Dashboards
  • 21. DO SERVER-SIDE BETTER BY GOING SERVERLESS SERVERLESS FRAMEWORK ▸ www.serverless.com ▸ CLI tool to create & manage Serverless Projects
  • 22. DO SERVER-SIDE BETTER BY GOING SERVERLESS SERVERLESS FRAMEWORK - FUN FACTS ▸ Just hit v1.0 ▸ $3 million in funding ▸ Source is Open ▸ Supports Node.js, Python, Java & More ▸ Other platforms than AWS coming soon (Serverless Platform is in beta)
  • 23. DO SERVER-SIDE BETTER BY GOING SERVERLESS SERVERLESS FRAMEWORK - WHY? ▸ Helps organize & manage a serverless project ▸ Lambda creation, configuration & deployment ▸ AWS resource management via CloudFormation stacks ▸ Setup of Lambdas to Events & Resources ▸ Project structure by Services
  • 24. DO SERVER-SIDE BETTER BY GOING SERVERLESS SERVERLESS FRAMEWORK - CONCEPTS ▸ Service ▸ Framework’s unit of organization (like a project) ▸ Defines the Functions along with the Events & Resources they use
  • 25. DO SERVER-SIDE BETTER BY GOING SERVERLESS SERVERLESS FRAMEWORK - CONCEPTS ▸ Function ▸ AWS Lambda Function ▸ Can be independently deployed ▸ Should do a single thing (separate concerns)
  • 26. DO SERVER-SIDE BETTER BY GOING SERVERLESS SERVERLESS FRAMEWORK - CONCEPTS ▸ Resources ▸ AWS infrastructure components ▸ DynamoDB Table ▸ S3 Buckets ▸ SNS Topics ▸ Anything defined by CloudFormation
  • 27. DO SERVER-SIDE BETTER BY GOING SERVERLESS SERVERLESS FRAMEWORK - CONCEPTS ▸ Events ▸ Anything that triggers an AWS Lambda Function to execute ▸ ex: S3 Bucket Upload, CloudWatch Timer, …
  • 28. DO SERVER-SIDE BETTER BY GOING SERVERLESS SERVERLESS FRAMEWORK - CLI $ serverless create --template aws-nodejs --path foo $ cd foo $ serverless deploy -v $ serverless deploy function -f bar $ serverless invoke -f bar -p ./event.json -l $ serverless logs -f bar -t
  • 29. DO SERVER-SIDE BETTER BY GOING SERVERLESS SERVERLESS FRAMEWORK - CONFIGURATION service: example provider: name: aws stage: dev region: us-east-1 runtime: nodejs4.3 memorySize: 128 timeout: 30 iamRoleStatements: - Effect: "Allow" Action: - "lambda:InvokeFunction" - 's3:PutObject' - 's3:GetObject' Resource: “*"
  • 30. DO SERVER-SIDE BETTER BY GOING SERVERLESS SERVERLESS FRAMEWORK - CONFIGURATION functions: echo: handler: foo/index.handler events: - stream: arn:aws:dynamodb:region:xxx:table/foo/stream/… resources: Resources: fooTable: Type: AWS::DynamoDB::Table Properties: TableName: fooTable KeySchema: - AttributeName: baz
  • 31. DO SERVER-SIDE BETTER BY GOING SERVERLESS ALL TOGETHER NOW - THE GOOD ▸ Node.js ▸ Event-driven I/O model ▸ Ubiquitous ▸ Prevalent
  • 32. DO SERVER-SIDE BETTER BY GOING SERVERLESS ALL TOGETHER NOW - THE GOOD ▸ AWS Lambda ▸ Pay per millisecond ▸ No servers to manage ▸ Fairly flexible (binaries, temp files, …)
  • 33. DO SERVER-SIDE BETTER BY GOING SERVERLESS ALL TOGETHER NOW - THE GOOD ▸ Serverless Framework ▸ Serverless management from the command line ▸ Gives structure/conventions to FaaS project ▸ Stays out of your way during coding
  • 34. DO SERVER-SIDE BETTER BY GOING SERVERLESS ALL TOGETHER NOW - THE BAD ▸ Node.js ▸ Language & ecosystem are evolving quickly ▸ Async first ▸ Lacking standard library
  • 35. DO SERVER-SIDE BETTER BY GOING SERVERLESS ALL TOGETHER NOW - THE BAD ▸ AWS lambda limits
  • 36. DO SERVER-SIDE BETTER BY GOING SERVERLESS ALL TOGETHER NOW - THE BAD ▸ AWS lambda limits
  • 37. DO SERVER-SIDE BETTER BY GOING SERVERLESS ALL TOGETHER NOW - THE BAD ▸ AWS lambda limits
  • 38. DO SERVER-SIDE BETTER BY GOING SERVERLESS ALL TOGETHER NOW - THE BAD ▸ AWS lambda ▸ Node v4.3 ▸ Cold Start Time ▸ Response Times ▸ API Gateway, CloudFront Distribution, Lambda ▸ AWS Web Console is not fun to use
  • 39. DO SERVER-SIDE BETTER BY GOING SERVERLESS ALL TOGETHER NOW - THE BAD ▸ AWS Lambda ▸ Debugging can be hard ▸ Statelessness ▸ Resource usage spikes ▸ Vendored dependencies
  • 40. DO SERVER-SIDE BETTER BY GOING SERVERLESS ALL TOGETHER NOW - THE BAD ▸ Serverless Framework ▸ Evolving quickly JAWS -> SF v0.5 -> SF v1.0 ▸ May not play well with other infrastructure tools ▸ New, needs maturity
  • 41. DO SERVER-SIDE BETTER BY GOING SERVERLESS MORAL OF THE STORY ▸ Great if you are planning to AWS ▸ Can be cost effective vs running & managing a server ▸ Awesome for event handling
  • 42. DO SERVER-SIDE BETTER BY GOING SERVERLESS THE END ▸ Questions? ▸ Twitter: @jasich, @grdevnight ▸ Slides will get posted there