© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Jarkko Hirvonen, Mgr Solutions Architecture, AWS
Future of Enterprise
Applications is Serverless
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Aboutme:
Jarkko Hirvonen
jarkkoh@amazon.com, @jarkkohi
Mgr, Solutions Architecture, AWS Nordics, 2016 
Previously:
Chief Architect, Sanoma Group, 2014 - 2015
Digital Architectures, Sanoma Finland, 2008 - 2014
Web & Digital Development, Capgemini, 2003 - 2008
Developer, SysAdmin, Support, 1999 - 2003
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://secure.flickr.com/photos/mgifford/4525333972
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
DevelopmenttransformationatAmazon:
1994-2001 2002+
Monolithic architecture +
hierarchical organization
Decoupled services +
Two-pizza teams
Two-pizzateam responsibilityVenn diagram
Responsible for
THEIR
PRODUCT
Deployment tools
CI/CD tools
Monitoring tools
Metrics tool
Logging tools
APM tools
Infrastructure provisioning
tools
Security tools
Database management
tools
Testing tools
….
Not responsible for
*
*Unless their product belongs in the blue
Two-pizzateam responsibilityVenn diagram
Responsible for Not responsible for
*
NOT
THEIR
PRODUCT
*Unless their product belongs in the blue
Application development
Infrastructure management
Application configuration
Pipeline configuration
Alarms
Runbooks
Testing
Compliance
Roadmap tracking
Goals tracking
On-call
Support escalation
….
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Two-pizzateam responsibilityVenn diagram
Responsible for
THEIR
PRODUCT
Not responsible for
NOT
THEIR
PRODUCT
Can we shift more from a
team’s responsibility to the
platform / shared services?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverlessmeans …
No servers to provision
or manage
Scales with usage
Never pay for idle Availability and fault
tolerance built in
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverlessmeans:
Greater agility
Less overhead
Better focus
Increased scale
More flexibility
Faster time to market
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverlessapplications
Services (anything)
Changes in
data state
Requests to
endpoints
Changes in
resource state
Event source Function
Node.js
Python
Java
C#
Go
Ruby (NEW)
Bring your own runtime (NEW)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Anatomyofa Lambda function
Handler() function
Function to be executed
upon invocation
Event object
Data sent during
Lambda function
Invocation
Context object
Methods available to
interact with runtime
information (request ID,
log group, etc.)
public String handleRequest(Book book, Context context) {
saveBook(book);
return book.getName() + " saved!";
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Fine-grainedpricing
Buy compute time in 100ms
increments
Low request charge
No hourly, daily, or monthly
minimums
No per-device fees
Never pay for idle
Free Tier
1M requests and 400,000 GBs of compute.
Every month, every customer.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Common Lambda usecases
Web
applications
• Static
websites
• Complex web
apps
• Packages for
Flask and
Express
Data
processing
• Real time
• MapReduce
• Batch
Chatbots
• Powering
chatbot logic
Backends
• Apps &
services
• Mobile
• IoT
</></>
Amazon
Alexa
• Powering
voice-enabled
apps
• Alexa Skills
Kit
IT
Automation
• Policy engines
• Extending
AWS services
• Infrastructure
management
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AmazonAPIGateway
Create a unified
API frontend for
multiple micro-
services
Authenticate and
authorize
requests to a
backend
DDoS protection
and throttling for
your backend
Throttle, meter,
and monetize API
usage by third-
party developers
APIGateway
Internet
Mobile apps
Websites
Services
AWS Lambda
functions
AWS
API Gateway
Cache
Endpoints on
Amazon EC2
Amazon
CloudWatch
monitoring
Amazon
CloudFront
Any other AWS
service
YOUR VPC
Endpoints in
Your VPC
Regional API endpoints
All publicly accessible
endpoints
AWS Lambda
functions
Serverlessweb applicationwithAPIGateway
API Gateway handles all your
application routing. It can
handle authentication and
authorization, throttling, DDOS
protection, and more.
Amazon S3
API Gateway
Lambda runs all the logic
behind your website and
interfaces with databases,
other backend services, or
anything else your site needs.
AWS Lambda
Amazon Simple Storage
Service (Amazon S3) stores
all of your static content: CSS,
JS, images, and more. You
would typically front this with a
CDN such as CloudFront.
Amazon
CloudFront
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverlessarchitectures
S3
bucket
object
Lambda
function
1. File put into bucket
2. Lambda invoked
Lambda
function
2. Lambda invoked
SNS
topic
1. Data published to a
topic
Data
1. Message inserted
into to a queue
message
Amazon
SQS
Lambda
function
3. Function
removes
message from
queue
2. Lambda polls
queue and
invokes function
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverlessarchitectures
Lambda
function
2. Lambda polls
stream
Amazon
Kinesis
Data Stream
1. Data published to a
stream
3. Amazon
Kinesis returns
stream data
Data
Lambda
function
1. Scheduled time
occurs
CloudWatch
Events
(time-based)
2. Lambda invoked
AWSStepFunctions
Serverless workflow management with zero
administration
• Makes it easy to coordinate the components
of distributed applications and
microservices using visual workflows
• Automatically triggers and tracks each step
and retries when there are errors, so your
application executes in order and as
expected
• Logs the state of each step, so when things
do go wrong, you can diagnose and debug
problems quickly
Task
Choice
Failure capture
Parallel Tasks
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWSLambda releasehistory
2015 2016 2017 2018
?
*As of October 2018, does not include region launches
N E W !
Language
s
Lambda
support for
Ruby
+ Bring any Linux compatible language
runtime;
Powered by new Runtime API -
Codifies the runtime calling conventions
and integration points
Same technology powering Ruby
support in AWS Lambda
Bring any Linux compatible
language runtime
Custom Runtimes
+
AWSOPENSOURCE
o f f e r e d b y
o f f e r e d b y
o f f e r e d b y
o f f e r e d b y
PARTNERSUPPORTED
N E W !
Extend the Lambda execution
environment with any binaries,
dependencies, or runtimes
Lambda Layers
BUSINESS
LOGIC
LIB
A
LIB
B
BUSINESS
LOGIC
LIB
A
LIB
B
BUSINESS
LOGIC
LIB
A
LIB
B
BUSINESS
LOGIC
LIB
A
LIB
B
Programming
Model
Before
BUSINESS
LOGIC
BUSINESS
LOGIC
BUSINESS
LOGIC
BUSINESS
LOGIC
LIB A LIB BAfter
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
NowOpen–AWSStockholmRegion
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
GetStartedat aws.amazon.com/serverless
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!
jarkkoh@amazon.com

The Future of Enterprise Applications is Serverless

  • 1.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Jarkko Hirvonen, Mgr Solutions Architecture, AWS Future of Enterprise Applications is Serverless
  • 2.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Aboutme: Jarkko Hirvonen jarkkoh@amazon.com, @jarkkohi Mgr, Solutions Architecture, AWS Nordics, 2016  Previously: Chief Architect, Sanoma Group, 2014 - 2015 Digital Architectures, Sanoma Finland, 2008 - 2014 Web & Digital Development, Capgemini, 2003 - 2008 Developer, SysAdmin, Support, 1999 - 2003
  • 3.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. https://secure.flickr.com/photos/mgifford/4525333972
  • 4.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. DevelopmenttransformationatAmazon: 1994-2001 2002+ Monolithic architecture + hierarchical organization Decoupled services + Two-pizza teams
  • 5.
    Two-pizzateam responsibilityVenn diagram Responsiblefor THEIR PRODUCT Deployment tools CI/CD tools Monitoring tools Metrics tool Logging tools APM tools Infrastructure provisioning tools Security tools Database management tools Testing tools …. Not responsible for * *Unless their product belongs in the blue
  • 6.
    Two-pizzateam responsibilityVenn diagram Responsiblefor Not responsible for * NOT THEIR PRODUCT *Unless their product belongs in the blue Application development Infrastructure management Application configuration Pipeline configuration Alarms Runbooks Testing Compliance Roadmap tracking Goals tracking On-call Support escalation ….
  • 7.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Two-pizzateam responsibilityVenn diagram Responsible for THEIR PRODUCT Not responsible for NOT THEIR PRODUCT Can we shift more from a team’s responsibility to the platform / shared services?
  • 8.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Serverlessmeans … No servers to provision or manage Scales with usage Never pay for idle Availability and fault tolerance built in
  • 9.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Serverlessmeans: Greater agility Less overhead Better focus Increased scale More flexibility Faster time to market
  • 10.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
  • 11.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Serverlessapplications Services (anything) Changes in data state Requests to endpoints Changes in resource state Event source Function Node.js Python Java C# Go Ruby (NEW) Bring your own runtime (NEW)
  • 12.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Anatomyofa Lambda function Handler() function Function to be executed upon invocation Event object Data sent during Lambda function Invocation Context object Methods available to interact with runtime information (request ID, log group, etc.) public String handleRequest(Book book, Context context) { saveBook(book); return book.getName() + " saved!"; }
  • 13.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Fine-grainedpricing Buy compute time in 100ms increments Low request charge No hourly, daily, or monthly minimums No per-device fees Never pay for idle Free Tier 1M requests and 400,000 GBs of compute. Every month, every customer.
  • 14.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Common Lambda usecases Web applications • Static websites • Complex web apps • Packages for Flask and Express Data processing • Real time • MapReduce • Batch Chatbots • Powering chatbot logic Backends • Apps & services • Mobile • IoT </></> Amazon Alexa • Powering voice-enabled apps • Alexa Skills Kit IT Automation • Policy engines • Extending AWS services • Infrastructure management
  • 15.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. AmazonAPIGateway Create a unified API frontend for multiple micro- services Authenticate and authorize requests to a backend DDoS protection and throttling for your backend Throttle, meter, and monetize API usage by third- party developers
  • 16.
    APIGateway Internet Mobile apps Websites Services AWS Lambda functions AWS APIGateway Cache Endpoints on Amazon EC2 Amazon CloudWatch monitoring Amazon CloudFront Any other AWS service YOUR VPC Endpoints in Your VPC Regional API endpoints All publicly accessible endpoints AWS Lambda functions
  • 17.
    Serverlessweb applicationwithAPIGateway API Gatewayhandles all your application routing. It can handle authentication and authorization, throttling, DDOS protection, and more. Amazon S3 API Gateway Lambda runs all the logic behind your website and interfaces with databases, other backend services, or anything else your site needs. AWS Lambda Amazon Simple Storage Service (Amazon S3) stores all of your static content: CSS, JS, images, and more. You would typically front this with a CDN such as CloudFront. Amazon CloudFront
  • 18.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Serverlessarchitectures S3 bucket object Lambda function 1. File put into bucket 2. Lambda invoked Lambda function 2. Lambda invoked SNS topic 1. Data published to a topic Data 1. Message inserted into to a queue message Amazon SQS Lambda function 3. Function removes message from queue 2. Lambda polls queue and invokes function
  • 19.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Serverlessarchitectures Lambda function 2. Lambda polls stream Amazon Kinesis Data Stream 1. Data published to a stream 3. Amazon Kinesis returns stream data Data Lambda function 1. Scheduled time occurs CloudWatch Events (time-based) 2. Lambda invoked
  • 20.
    AWSStepFunctions Serverless workflow managementwith zero administration • Makes it easy to coordinate the components of distributed applications and microservices using visual workflows • Automatically triggers and tracks each step and retries when there are errors, so your application executes in order and as expected • Logs the state of each step, so when things do go wrong, you can diagnose and debug problems quickly Task Choice Failure capture Parallel Tasks
  • 21.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. AWSLambda releasehistory 2015 2016 2017 2018 ? *As of October 2018, does not include region launches
  • 22.
    N E W! Language s Lambda support for Ruby + Bring any Linux compatible language runtime; Powered by new Runtime API - Codifies the runtime calling conventions and integration points Same technology powering Ruby support in AWS Lambda Bring any Linux compatible language runtime Custom Runtimes + AWSOPENSOURCE o f f e r e d b y o f f e r e d b y o f f e r e d b y o f f e r e d b y PARTNERSUPPORTED
  • 23.
    N E W! Extend the Lambda execution environment with any binaries, dependencies, or runtimes Lambda Layers BUSINESS LOGIC LIB A LIB B BUSINESS LOGIC LIB A LIB B BUSINESS LOGIC LIB A LIB B BUSINESS LOGIC LIB A LIB B Programming Model Before BUSINESS LOGIC BUSINESS LOGIC BUSINESS LOGIC BUSINESS LOGIC LIB A LIB BAfter
  • 24.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. NowOpen–AWSStockholmRegion
  • 25.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. GetStartedat aws.amazon.com/serverless
  • 26.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Thank you! jarkkoh@amazon.com

Editor's Notes

  • #2 Welcome Serverless Track I am…
  • #3 Few words… SA team lead Sanoma Developer, Admin…
  • #4 Why are we here? New way of working – DevOps? Serverless technologies are here to stay Cornerstone in application design for many business critical applications https://secure.flickr.com/photos/mgifford/4525333972
  • #5 Amazon founded 1994 Monolithic organization with separate development, operations, testing, dba:s. Monolithic product. Everything in Amazon.com back then – monolitchic application. From 2002 – massive transformation How we think about building applications and organizing teams. Decomposing Amazon.com and building new businesses AWS, Alexa, Kindle… with this model 1000s of microservices in amazon Two Pizza team concept 6-10 people. Some nbr of microservices – some part of overall product. S3 = 200 microservices. Allows it to scale & add features. trillions of objects and regularly peaks at millions of requests per second.
  • #6 New developer comes in Flexible toolbox to build on. No need for team to worry about tooling This concept has lead us building services like S3, DynamoDB, Codepipeline
  • #7 What still is team resp – traditional still lots of things. Like infrastructure management, alarms, runbooks, compliance…
  • #8 Thinking - Can we shift more from the team to platform 2014 – introduced AWS Lambda
  • #9 What does serverless mean for us? No servers to provision, manage or patch Scalability built in You shouldn’t pay for idle High availability built in. (Az:s)
  • #10 For business… What our customers have told us: Agility Better focus on product & faster time to market Helps with scalability.
  • #11 The center of our world, and what we believe the future will be, is AWS Lambda. Compute service – where you don’t need to think about the underlying infrastructure. (servers, containers, open sources Firecracker…)
  • #12 Overview of serverless application Event Sources Function written in.. Services – anything. DB, rest-endpoint…
  • #13 Regardless of programming language Handler - called on invoke Event - payload coming in. REST, Queue, DB change Context - runtime (req id, logging...)
  • #14 You don't pay for Idle 100ms increments Free-tier Easy & Cheap to get started
  • #15 Web apps Backends, mobile, iot Data processing Chatbots & Alexa IT Automation
  • #16 REST APIs Scalability Security, DDoS, Auth Throttling, monetizaton
  • #17 API GW overall Cloudfront Cache + monitoring Backends: Lambda, EC2, ECS, Any VPC
  • #18 Typical web app pattern
  • #19 Simple patterns: Data processing Messaging
  • #20 Streaming Scheduled jobs
  • #21 Keep orchestration out of code. Retries, exponential backoff. Parallel execution. Waiting and polling for results.
  • #22 Adding languages & increasing memory (now 3GB) Lambda timeout 15min (prev 5min) SLA 99.95 In re:Invent – click…
  • #23 In reinvent 2weeks ago Ruby launch Custom Runtimes allowing you to bring your own language. Our Ruby support is built on this. We are providing a C++ and Rust custom runtimes that you can use. They are available on GitHub partners providing runtimes such as PHP, Cobol
  • #24 Layers Before – After -
  • #25 That was Lambda in a nutshell. Get started now Sweden region open now! All mentioned services available there.
  • #26 Get started here