SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Downloaden Sie, um offline zu lesen
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Getting Started with
Serverless Architectures
C h r i s M u n n s – S e r v e r l e s s S e n i o r D e v e l o p e r A d v o c a t e – A W S
N i c k y J o s h i – D i r e c t o r S o f t w a r e E n g i n e e r i n g – C a p i t a l O n e
N o v e m b e r 2 8 , 2 0 1 7
C M P 2 1 1
About me
Chris Munns—munns@amazon.com, @chrismunns
• Senior Developer Advocate–Serverless
• New Yorker
• Previously:
• AWS Business Development Manager—DevOps, July 2015–February
2017
• AWS Solutions Architect, November 2011–December 2014
• Formerly on operations teams @Etsy and @Meetup
• Little time at a hedge fund, Xerox, and a few other startups
• Rochester Institute of Technology: Applied Networking and Systems
Administration, ’05
• Internet infrastructure geek
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
https://secure.flickr.com/photos/mgifford/4525333972
Why are we
here today?
No servers to provision
or manage
Scales with usage
Never pay for idle Availability and
fault-tolerance built in
Serverless means…
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SERVICES (ANYTHING)
Changes in
data state
Requests to
endpoints
Changes in
resource state
EVENT SOURCE FUNCTION
Node.js
Python
Java
C#
Serverless applications
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CUSTOMERS LOVE SERVERLESS
Common serverless use cases
Web
applications
• Static
websites
• Complex web
apps
• Packages for
Flask and
Express
Data
processing
• Real-time
• MapReduce
• Batch
Chatbots
• Powering
chatbot logic
Backends
• Apps and
services
• Mobile
• IoT
</></>
Amazon
Alexa
• Powering
voice-enabled
apps
• Alexa Skills
Kit
IT
automation
• Policy engines
• Extending
AWS services
• Infrastructure
management
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Event-Driven Compute
Functions as a Service
Serverless FaaS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Using AWS Lambda
Bring your own code
• Node.js, Java, Python,
C#
• Bring your own libraries
(even native ones)
Simple resource model
• Select power rating from
128 MB to 1.5 GB
• CPU and network
allocated proportionately
Flexible use
• Synchronous or
asynchronous
• Integrated with other
AWS services
Flexible authorization
• Securely grant access to
resources and VPCs
• Fine-grained control for
invoking your functions
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Using AWS Lambda
Authoring functions
• WYSIWYG editor or
upload packaged .zip
• Third-party plugins
(Eclipse, Visual Studio)
Monitoring and logging
• Metrics for requests,
errors, and throttles
• Built-in logs to Amazon
CloudWatch Logs
Programming model
• Use processes, threads,
/tmp, sockets normally
• AWS SDK built in
(Python and Node.js)
Stateless
• Persist data using
external storage
• No affinity or access to
underlying infrastructure
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Fine-grained pricing
Buy compute time in 100-ms increments
Low request charge
No hourly, daily, or monthly minimums
No per-device fees
Never pay for idle
Free Tier
1 M requests and 400,000 GB-s of compute
Every month, every customer
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lambda execution model
Synchronous (push) Asynchronous (event) Stream-based
Amazon
API Gateway
AWS Lambda
function
Amazon
DynamoDBAmazon
SNS
/order
AWS Lambda
function
Amazon
S3
reqs
Amazon
Kinesis
changes
AWS Lambda
service
function
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon S3 Amazon
DynamoDB
Amazon
Kinesis
AWS
CloudFormation
AWS CloudTrail Amazon
CloudWatch
Amazon
Cognito
Amazon SNSAmazon
SES
Cron events
DATA STORES ENDPOINTS
DEVELOPMENT AND MANAGEMENT TOOLS EVENT/MESSAGE SERVICES
Event sources that trigger AWS Lambda
…and more!
AWS
CodeCommit
Amazon
API Gateway
Amazon
Alexa
AWS IoT AWS Step
Functions
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lambda permissions model
Fine-grained security controls for both
execution and invocation
Execution policies:
• Define what AWS resources/API calls this
function can access via IAM
• Used in streaming invocations
• For example, “Lambda function A can read
from DynamoDB table users”
Function policies:
• Used for sync and async invocations
• For example, “Actions on bucket X can invoke
Lambda function Z”
• Resource policies allow for cross-account
access
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon API Gateway
Internet
Mobile Apps
Websites
Services
AWS Lambda
functions
AWS
All publicly
accessible
endpoints
Amazon
CloudWatch
Monitoring
Amazon
CloudFront
Any other
AWS service
Endpoints on
Amazon EC2
AWS Step
Functions
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Create a unified
API front end for
multiple
microservices
Authenticate and
authorize
requests to a
backend
DDoS protection
and throttling for
your backend
Throttle, meter,
and monetize API
usage by third-
party developers
Amazon API Gateway
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Step Functions
“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
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Service for building conversational interfaces
into any application using voice and text
Automatic speech recognition (ASR) for
converting speech to text
Natural language understanding (NLU) to
recognize the intent of messages
Powered by the same deep-learning
technology as Amazon Alexa
Fully managed service
Amazon Lex
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
“Can I go ahead
with the booking?”
“Book a hotel”
“Book a Hotel in
NYC”
Automatic Speech
Recognition
Hotel Booking
New York City
Natural Language
Understanding
Intent/Slot
Model
UtterancesHotel Booking
City New York City
Check In Nov 30th
Check Out Dec 2nd
“Your hotel is booked for
Nov 30th”
Amazon Polly
Confirmation: “Your hotel
is booked for Nov 30th”
Book Hotel
NYC
a
in
Amazon
Kinesis
AWS
Lambda 1
Amazon
CloudWatch
Amazon
DynamoDB
AWS
Lambda 2 Amazon
S3
Real-time data processing:
1. Real-time event data sent to Amazon Kinesis
allows multiple AWS Lambda functions to
process the same events
2. In AWS Lambda, Function 1 processes and
aggregates data from incoming events, then
stores result data in Amazon DynamoDB
3. Lambda Function 1 also sends values to
Amazon CloudWatch for simple monitoring of
metrics
4. In AWS Lambda function, Function 2 does data
manipulation of incoming events and stores
results in Amazon S3
https://s3.amazonaws.com/awslambda-reference-architectures/stream-processing/lambda-refarch-streamprocessing.pdf
Lambda + Kinesis
Bustle.com
Bustle.com is a news, entertainment, lifestyle, and fashion
website catering to women:
• 52 million monthly users
• 100 million events daily
• 84% cost savings
• 0 servers
• 0 operating system patches
• Automatic scaling
https://aws.amazon.com/solutions/case-studies/bustle/© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon
API Gateway
AWS Lambda Amazon Kinesis AWS Lambda
Redis
Amazon Mobile
Analytics
Amazon CloudWatch
Amazon Elasticsearch
Service
Amazon S3
Amazon RedshiftAmazon QuickSightEngineering
Marketing & Operations
Design
Bustle.com users
Bustle.com event-stream processing
Serverless distributed computing: PyWren
PyWren prototype developed at University of California, Berkeley
Uses Python with AWS Lambda stateless functions for large-scale data
analytics
Achieved @ 30-40 MB/s write and read performance per core to Amazon S3
object store
Scaled to 60-80 GB/s across 2,800 simultaneous functions
Square Enix
Makers of Dragon Quest games:
• Lambda processes 200-300 images
uploaded per minute
• Peak processing of 6,000 images
per minute
• Reduced image time from hours to
only 10+ seconds at 1/20 the cost
of their previous solution
https://aws.amazon.com/solutions/case-studies/square-enix/© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Home24 coordinating daily imports of
marketing data
European market leader in online shopping
for home and living products, operating in
eight countries and two continents
Built a reliable, long-running serverless
application to coordinate the daily import of
gigabytes of social media data from 20+
sources for use in business analytics
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How Home24 lowered costs by 99%
Home24 sequenced a varying number of
Lambda functions with AWS Step Functions
to download and refine files from multiple
sources
• Cost savings: Saved 99% with AWS Step
Functions as opposed to their previous
SaaS solution
• Productivity and agility: Engineers can
easily coordinate various microservices
to build ELT pipelines
• Increased resilience: Automatic retries
when service APIs are unavailable
Build PCI- and HIPAA-compliant serverless
applications!
Serverless platform services that can be used in both:
AWS
Lambda
Amazon
S3
Amazon
CloudFront
Amazon
DynamoDB
Amazon
Kinesis
Streams
Amazon
Cognito
Amazon API
Gateway
Amazon
SNS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Capital One Auto—
Journey to Serverless
Capital One
• Top 10 US bank
• Al exa Websi te
Ranki ng says
capi tal one.com
traffi c i s “ 81st i n
US Web Si tes”
• Auto fi nanci ng —
one mi l l i on
hi ts/month
Migration journey timeline
Migration requirements
• Full functionality and more
• Secure—yes, we actually are a financial institution
• Resilient (active/active)
• Responsive—front-facing marketing home page, so initial load time is critical
• SEO-friendly
• Continuous deployments—changes on demand
• Low-maintenance—it just needs to run
• Use existing tools and processes in the enterprise—don’t reinvent the wheel
• Logging
• Monitoring
• Deployments
The painful old days
• H o s t e d i n o n - p r e m i s e s
d a t a c e n t e r
• E n t e r p r i s e - w i d e
c o m m o n d e p l o y m e n t s
• O n e c a l e n d a r —
f e a t u r e s p l a n n e d
m o n t h s i n a d v a n c e
• T i g h t c o u p l i n g
b e t w e e n c o m p o n e n t s
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Serverless migration—I
Move to AWS
Serverless content strategy
App architecture—content
Amazon
Route 53
Amazon S3
Amazon S3
East Region
West Region
Amazon
CloudFront
Amazon
CloudFront
Amazon
Route 53
Rest APIs
EC2
EC2
EC2
EC2
WAF App
AZ1
AZ2
AZ3
East
EC2
EC2
EC2
EC2
WAF App
AZ1
AZ2
AZ3
West
App architecture—APIs
CI/CD for content
• A p p t e m p l a t e s i n
G i t H u b
• C o n t e n t i n C M S h o s t e d
s e r v i c e
• P r e - r e n d e r a n g u l a r
c o n t e n t , S E O - f r i e n d l y
• U s e A W S C L I t o p u s h
c o n t e n t t o A m a z o n S 3
b u c k e t f o r w e b
h o s t i n g
Content Management
System
AWS CLI
Amazon EC2
Build Server
Content S3 Bucket
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Serverless migration—II
Lambda-based APIs
CI/CD processes
Move to serverless APIs
Amazon
Route 53
Rest APIs
CapOne
Enterprise
Gateway
Lambda
Fn
Amazon
CloudWatch
Lambda
Fn
East
CapOne
Enterprise
Gateway
Lambda
Fn
Amazon
CloudWatch
Lambda
Fn
West
CI/CD—Lambda functions
AWS CLI
Deployment S3 Bucket
Lambda Create
Lambda Update
Lamba Fn
• L a m b d a c o d e i n G i t H u b
• J e n k i n s - t r i g g e r e d b u i l d
• U s e s A W S C L I
• D e p l o y i n A m a z o n S 3
b u c k e t
• C r e a t e / u p d a t e
L a m b d a f u n c t i o n
• O t h e r o p t i o n s :
• S A M
• S e r v e r l e s s f r a m e w o r k
Benefits of serverless
• Very simple architecture
• Runs itself, less monitoring
• Scales itself, no work on auto scaling needed
• No worries on AMI rehydration, which keeps compliance and
operations happy
• Cost savings:
• Conservative savings to tune of $50K/year
• Amazon S3 web hosting eliminated any Amazon EC2 needs for
website hosting
• Able to eliminate 20 Amazon EC2 instances, CLBs, and Amazon EBS
volumes from API architecture
• Countless hours saved on operations of application
Lessons learned
• Migration can be a journey, so plan accordingly
• Step-by-step progress is recommended
• Start small
• Serverless architectures are flexible and fungible
• No one size fits all
• Reuse tools and processes in the organization
• Get stakeholder buy-in early
FIN, ACK
Serverless:
• No servers to
manage
• No cost for idle
• Automatic scaling
• High availability
Use cases:
• Web applications
• Backends
• Data processing
• Chatbots
• Amazon Alexa
• IT automation
Integrated across AWS:
• Amazon API Gateway
• AWS Step Functions
• Amazon S3
• Amazon Kinesis
• Amazon DynamoDB
• Amazon SNS
• Amazon Cognito
• AWS CloudFormation
• AWS CodePipeline
• Amazon CloudWatch
• AWS IoT
• Many more!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
aws.amazon.com/serverless
Chris Munns
munns@amazon.com
@chrismunnshttps://www.flickr.com/photos/theredproject/3302110152/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!
R e m e m b e r t o r e v i e w t h i s s e s s i o n !
C M P 2 1 1

Weitere ähnliche Inhalte

Was ist angesagt?

CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web Services
CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web ServicesCMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web Services
CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web ServicesAmazon Web Services
 
Born in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupBorn in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupAmazon Web Services
 
MBL201_Progressive Web Apps in the Real World
MBL201_Progressive Web Apps in the Real WorldMBL201_Progressive Web Apps in the Real World
MBL201_Progressive Web Apps in the Real WorldAmazon Web Services
 
MCL204_How Washington County Sherriff’s Office is using Amazon AI to Identify...
MCL204_How Washington County Sherriff’s Office is using Amazon AI to Identify...MCL204_How Washington County Sherriff’s Office is using Amazon AI to Identify...
MCL204_How Washington County Sherriff’s Office is using Amazon AI to Identify...Amazon Web Services
 
SRV314_Building a Serverless Pipeline to Transcode a Two-Hour Video in Minutes
SRV314_Building a Serverless Pipeline to Transcode a Two-Hour Video in MinutesSRV314_Building a Serverless Pipeline to Transcode a Two-Hour Video in Minutes
SRV314_Building a Serverless Pipeline to Transcode a Two-Hour Video in MinutesAmazon Web Services
 
NET203_Using Amazon VPC Flow Logs to Do Predictive Security Analytics
NET203_Using Amazon VPC Flow Logs to Do Predictive Security AnalyticsNET203_Using Amazon VPC Flow Logs to Do Predictive Security Analytics
NET203_Using Amazon VPC Flow Logs to Do Predictive Security AnalyticsAmazon Web Services
 
DAT339_Replicate, Analyze, and Visualize Datasets Using AWS Database Migratio...
DAT339_Replicate, Analyze, and Visualize Datasets Using AWS Database Migratio...DAT339_Replicate, Analyze, and Visualize Datasets Using AWS Database Migratio...
DAT339_Replicate, Analyze, and Visualize Datasets Using AWS Database Migratio...Amazon Web Services
 
DEV326_DevOps Essentials An Introductory Workshop on CICD Practices
DEV326_DevOps Essentials An Introductory Workshop on CICD PracticesDEV326_DevOps Essentials An Introductory Workshop on CICD Practices
DEV326_DevOps Essentials An Introductory Workshop on CICD PracticesAmazon Web Services
 
IOT204_AWS Greengrass Basic Workshop
IOT204_AWS Greengrass Basic WorkshopIOT204_AWS Greengrass Basic Workshop
IOT204_AWS Greengrass Basic WorkshopAmazon Web Services
 
Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural PatternsAmazon Web Services
 
CON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWSCON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWSAmazon Web Services
 
Scaling up to Your First 10 Million Users
Scaling up to Your First 10 Million UsersScaling up to Your First 10 Million Users
Scaling up to Your First 10 Million UsersAmazon Web Services
 
SRV310_Designing Microservices with Serverless
SRV310_Designing Microservices with ServerlessSRV310_Designing Microservices with Serverless
SRV310_Designing Microservices with ServerlessAmazon Web Services
 
CMP304_Deep Dive Backing Up Amazon EC2 with Amazon EBS Snapshots
CMP304_Deep Dive Backing Up Amazon EC2 with Amazon EBS SnapshotsCMP304_Deep Dive Backing Up Amazon EC2 with Amazon EBS Snapshots
CMP304_Deep Dive Backing Up Amazon EC2 with Amazon EBS SnapshotsAmazon Web Services
 
Serverless Architecture Patterns
Serverless Architecture PatternsServerless Architecture Patterns
Serverless Architecture PatternsAmazon Web Services
 
LFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdfLFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdfAmazon Web Services
 
CON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersCON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersAmazon Web Services
 

Was ist angesagt? (20)

CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web Services
CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web ServicesCMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web Services
CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web Services
 
Born in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupBorn in the Cloud, Built like a Startup
Born in the Cloud, Built like a Startup
 
Introducing Amazon Fargate
Introducing Amazon FargateIntroducing Amazon Fargate
Introducing Amazon Fargate
 
MBL201_Progressive Web Apps in the Real World
MBL201_Progressive Web Apps in the Real WorldMBL201_Progressive Web Apps in the Real World
MBL201_Progressive Web Apps in the Real World
 
MCL204_How Washington County Sherriff’s Office is using Amazon AI to Identify...
MCL204_How Washington County Sherriff’s Office is using Amazon AI to Identify...MCL204_How Washington County Sherriff’s Office is using Amazon AI to Identify...
MCL204_How Washington County Sherriff’s Office is using Amazon AI to Identify...
 
SRV314_Building a Serverless Pipeline to Transcode a Two-Hour Video in Minutes
SRV314_Building a Serverless Pipeline to Transcode a Two-Hour Video in MinutesSRV314_Building a Serverless Pipeline to Transcode a Two-Hour Video in Minutes
SRV314_Building a Serverless Pipeline to Transcode a Two-Hour Video in Minutes
 
Serverless - State Of the Union
Serverless - State Of the UnionServerless - State Of the Union
Serverless - State Of the Union
 
NET203_Using Amazon VPC Flow Logs to Do Predictive Security Analytics
NET203_Using Amazon VPC Flow Logs to Do Predictive Security AnalyticsNET203_Using Amazon VPC Flow Logs to Do Predictive Security Analytics
NET203_Using Amazon VPC Flow Logs to Do Predictive Security Analytics
 
DAT339_Replicate, Analyze, and Visualize Datasets Using AWS Database Migratio...
DAT339_Replicate, Analyze, and Visualize Datasets Using AWS Database Migratio...DAT339_Replicate, Analyze, and Visualize Datasets Using AWS Database Migratio...
DAT339_Replicate, Analyze, and Visualize Datasets Using AWS Database Migratio...
 
DEV326_DevOps Essentials An Introductory Workshop on CICD Practices
DEV326_DevOps Essentials An Introductory Workshop on CICD PracticesDEV326_DevOps Essentials An Introductory Workshop on CICD Practices
DEV326_DevOps Essentials An Introductory Workshop on CICD Practices
 
IOT204_AWS Greengrass Basic Workshop
IOT204_AWS Greengrass Basic WorkshopIOT204_AWS Greengrass Basic Workshop
IOT204_AWS Greengrass Basic Workshop
 
Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural Patterns
 
CON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWSCON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWS
 
Scaling up to Your First 10 Million Users
Scaling up to Your First 10 Million UsersScaling up to Your First 10 Million Users
Scaling up to Your First 10 Million Users
 
SRV310_Designing Microservices with Serverless
SRV310_Designing Microservices with ServerlessSRV310_Designing Microservices with Serverless
SRV310_Designing Microservices with Serverless
 
CMP304_Deep Dive Backing Up Amazon EC2 with Amazon EBS Snapshots
CMP304_Deep Dive Backing Up Amazon EC2 with Amazon EBS SnapshotsCMP304_Deep Dive Backing Up Amazon EC2 with Amazon EBS Snapshots
CMP304_Deep Dive Backing Up Amazon EC2 with Amazon EBS Snapshots
 
Serverless Architecture Patterns
Serverless Architecture PatternsServerless Architecture Patterns
Serverless Architecture Patterns
 
ARC205_Born in the Cloud
ARC205_Born in the CloudARC205_Born in the Cloud
ARC205_Born in the Cloud
 
LFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdfLFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdf
 
CON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersCON203_Driving Innovation with Containers
CON203_Driving Innovation with Containers
 

Ähnlich wie CMP211_Getting Started with Serverless Architectures

Getting Started with AWS Lambda Serverless Computing
Getting Started with AWS Lambda Serverless ComputingGetting Started with AWS Lambda Serverless Computing
Getting Started with AWS Lambda Serverless ComputingAmazon Web Services
 
Building Serverless Microservices with AWS
Building Serverless Microservices with AWSBuilding Serverless Microservices with AWS
Building Serverless Microservices with AWSDonnie Prakoso
 
Getting started with Serverless on AWS
Getting started with Serverless on AWSGetting started with Serverless on AWS
Getting started with Serverless on AWSAdrian Hornsby
 
Authoring and Deploying Serverless Applications with AWS SAM
Authoring and Deploying Serverless Applications with AWS SAMAuthoring and Deploying Serverless Applications with AWS SAM
Authoring and Deploying Serverless Applications with AWS SAMAmazon Web Services
 
Serverless Architectural Patterns 
and Best Practices - Madhu Shekar - AWS
Serverless Architectural Patterns 
and Best Practices - Madhu Shekar - AWSServerless Architectural Patterns 
and Best Practices - Madhu Shekar - AWS
Serverless Architectural Patterns 
and Best Practices - Madhu Shekar - AWSCodeOps Technologies LLP
 
Getting Started with AWS Lambda & Serverless Computing - Kashif Imran.pdf
Getting Started with AWS Lambda & Serverless Computing - Kashif Imran.pdfGetting Started with AWS Lambda & Serverless Computing - Kashif Imran.pdf
Getting Started with AWS Lambda & Serverless Computing - Kashif Imran.pdfAmazon Web Services
 
Building secure and scalable mobile applications on AWS - AWS Summit Cape Tow...
Building secure and scalable mobile applications on AWS - AWS Summit Cape Tow...Building secure and scalable mobile applications on AWS - AWS Summit Cape Tow...
Building secure and scalable mobile applications on AWS - AWS Summit Cape Tow...Amazon Web Services
 
Getting Started with AWS Lambda and Serverless
Getting Started with AWS Lambda and ServerlessGetting Started with AWS Lambda and Serverless
Getting Started with AWS Lambda and ServerlessAmazon Web Services
 
AWS Application Service Workshop - Serverless Architecture
AWS Application Service Workshop - Serverless ArchitectureAWS Application Service Workshop - Serverless Architecture
AWS Application Service Workshop - Serverless ArchitectureJohn Yeung
 
Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural PatternsAdrian Hornsby
 
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...Amazon Web Services
 
Accelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform ServicesAccelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform ServicesAmazon Web Services
 
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017Amazon Web Services
 
Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsAmazon Web Services
 
Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...
Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...
Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...Amazon Web Services
 
Building .NET-based Serverless Architectures and Running .NET Core Microservi...
Building .NET-based Serverless Architectures and Running .NET Core Microservi...Building .NET-based Serverless Architectures and Running .NET Core Microservi...
Building .NET-based Serverless Architectures and Running .NET Core Microservi...Amazon Web Services
 
Serverless in Action on AWS
Serverless in Action on AWSServerless in Action on AWS
Serverless in Action on AWSAdrian Hornsby
 
AWS Innovate Montreal Keynote - by Chris Munns
AWS Innovate Montreal Keynote - by Chris MunnsAWS Innovate Montreal Keynote - by Chris Munns
AWS Innovate Montreal Keynote - by Chris MunnsAmazon Web Services
 

Ähnlich wie CMP211_Getting Started with Serverless Architectures (20)

Getting Started with AWS Lambda Serverless Computing
Getting Started with AWS Lambda Serverless ComputingGetting Started with AWS Lambda Serverless Computing
Getting Started with AWS Lambda Serverless Computing
 
Building Serverless Microservices with AWS
Building Serverless Microservices with AWSBuilding Serverless Microservices with AWS
Building Serverless Microservices with AWS
 
Getting started with Serverless on AWS
Getting started with Serverless on AWSGetting started with Serverless on AWS
Getting started with Serverless on AWS
 
Authoring and Deploying Serverless Applications with AWS SAM
Authoring and Deploying Serverless Applications with AWS SAMAuthoring and Deploying Serverless Applications with AWS SAM
Authoring and Deploying Serverless Applications with AWS SAM
 
Serverless Architectural Patterns 
and Best Practices - Madhu Shekar - AWS
Serverless Architectural Patterns 
and Best Practices - Madhu Shekar - AWSServerless Architectural Patterns 
and Best Practices - Madhu Shekar - AWS
Serverless Architectural Patterns 
and Best Practices - Madhu Shekar - AWS
 
Getting Started with AWS Lambda & Serverless Computing - Kashif Imran.pdf
Getting Started with AWS Lambda & Serverless Computing - Kashif Imran.pdfGetting Started with AWS Lambda & Serverless Computing - Kashif Imran.pdf
Getting Started with AWS Lambda & Serverless Computing - Kashif Imran.pdf
 
Building secure and scalable mobile applications on AWS - AWS Summit Cape Tow...
Building secure and scalable mobile applications on AWS - AWS Summit Cape Tow...Building secure and scalable mobile applications on AWS - AWS Summit Cape Tow...
Building secure and scalable mobile applications on AWS - AWS Summit Cape Tow...
 
Getting Started with AWS Lambda and Serverless
Getting Started with AWS Lambda and ServerlessGetting Started with AWS Lambda and Serverless
Getting Started with AWS Lambda and Serverless
 
AWS Application Service Workshop - Serverless Architecture
AWS Application Service Workshop - Serverless ArchitectureAWS Application Service Workshop - Serverless Architecture
AWS Application Service Workshop - Serverless Architecture
 
Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural Patterns
 
Serverless Developer Experience
Serverless Developer ExperienceServerless Developer Experience
Serverless Developer Experience
 
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...
 
Accelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform ServicesAccelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform Services
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
 
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
 
Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless Applications
 
Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...
Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...
Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...
 
Building .NET-based Serverless Architectures and Running .NET Core Microservi...
Building .NET-based Serverless Architectures and Running .NET Core Microservi...Building .NET-based Serverless Architectures and Running .NET Core Microservi...
Building .NET-based Serverless Architectures and Running .NET Core Microservi...
 
Serverless in Action on AWS
Serverless in Action on AWSServerless in Action on AWS
Serverless in Action on AWS
 
AWS Innovate Montreal Keynote - by Chris Munns
AWS Innovate Montreal Keynote - by Chris MunnsAWS Innovate Montreal Keynote - by Chris Munns
AWS Innovate Montreal Keynote - by Chris Munns
 

Mehr von Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

Mehr von Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

CMP211_Getting Started with Serverless Architectures

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Getting Started with Serverless Architectures C h r i s M u n n s – S e r v e r l e s s S e n i o r D e v e l o p e r A d v o c a t e – A W S N i c k y J o s h i – D i r e c t o r S o f t w a r e E n g i n e e r i n g – C a p i t a l O n e N o v e m b e r 2 8 , 2 0 1 7 C M P 2 1 1
  • 2. About me Chris Munns—munns@amazon.com, @chrismunns • Senior Developer Advocate–Serverless • New Yorker • Previously: • AWS Business Development Manager—DevOps, July 2015–February 2017 • AWS Solutions Architect, November 2011–December 2014 • Formerly on operations teams @Etsy and @Meetup • Little time at a hedge fund, Xerox, and a few other startups • Rochester Institute of Technology: Applied Networking and Systems Administration, ’05 • Internet infrastructure geek © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 4. No servers to provision or manage Scales with usage Never pay for idle Availability and fault-tolerance built in Serverless means… © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 5. SERVICES (ANYTHING) Changes in data state Requests to endpoints Changes in resource state EVENT SOURCE FUNCTION Node.js Python Java C# Serverless applications © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CUSTOMERS LOVE SERVERLESS
  • 7. Common serverless use cases Web applications • Static websites • Complex web apps • Packages for Flask and Express Data processing • Real-time • MapReduce • Batch Chatbots • Powering chatbot logic Backends • Apps and services • Mobile • IoT </></> Amazon Alexa • Powering voice-enabled apps • Alexa Skills Kit IT automation • Policy engines • Extending AWS services • Infrastructure management © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 8. Event-Driven Compute Functions as a Service Serverless FaaS © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 9. Using AWS Lambda Bring your own code • Node.js, Java, Python, C# • Bring your own libraries (even native ones) Simple resource model • Select power rating from 128 MB to 1.5 GB • CPU and network allocated proportionately Flexible use • Synchronous or asynchronous • Integrated with other AWS services Flexible authorization • Securely grant access to resources and VPCs • Fine-grained control for invoking your functions © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 10. Using AWS Lambda Authoring functions • WYSIWYG editor or upload packaged .zip • Third-party plugins (Eclipse, Visual Studio) Monitoring and logging • Metrics for requests, errors, and throttles • Built-in logs to Amazon CloudWatch Logs Programming model • Use processes, threads, /tmp, sockets normally • AWS SDK built in (Python and Node.js) Stateless • Persist data using external storage • No affinity or access to underlying infrastructure © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 11. Fine-grained pricing Buy compute time in 100-ms increments Low request charge No hourly, daily, or monthly minimums No per-device fees Never pay for idle Free Tier 1 M requests and 400,000 GB-s of compute Every month, every customer © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 12. Lambda execution model Synchronous (push) Asynchronous (event) Stream-based Amazon API Gateway AWS Lambda function Amazon DynamoDBAmazon SNS /order AWS Lambda function Amazon S3 reqs Amazon Kinesis changes AWS Lambda service function © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 13. Amazon S3 Amazon DynamoDB Amazon Kinesis AWS CloudFormation AWS CloudTrail Amazon CloudWatch Amazon Cognito Amazon SNSAmazon SES Cron events DATA STORES ENDPOINTS DEVELOPMENT AND MANAGEMENT TOOLS EVENT/MESSAGE SERVICES Event sources that trigger AWS Lambda …and more! AWS CodeCommit Amazon API Gateway Amazon Alexa AWS IoT AWS Step Functions © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 14. Lambda permissions model Fine-grained security controls for both execution and invocation Execution policies: • Define what AWS resources/API calls this function can access via IAM • Used in streaming invocations • For example, “Lambda function A can read from DynamoDB table users” Function policies: • Used for sync and async invocations • For example, “Actions on bucket X can invoke Lambda function Z” • Resource policies allow for cross-account access © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 15. Amazon API Gateway Internet Mobile Apps Websites Services AWS Lambda functions AWS All publicly accessible endpoints Amazon CloudWatch Monitoring Amazon CloudFront Any other AWS service Endpoints on Amazon EC2 AWS Step Functions © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 16. Create a unified API front end for multiple microservices Authenticate and authorize requests to a backend DDoS protection and throttling for your backend Throttle, meter, and monetize API usage by third- party developers Amazon API Gateway © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 17. AWS Step Functions “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 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 18. Service for building conversational interfaces into any application using voice and text Automatic speech recognition (ASR) for converting speech to text Natural language understanding (NLU) to recognize the intent of messages Powered by the same deep-learning technology as Amazon Alexa Fully managed service Amazon Lex © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 19. “Can I go ahead with the booking?” “Book a hotel” “Book a Hotel in NYC” Automatic Speech Recognition Hotel Booking New York City Natural Language Understanding Intent/Slot Model UtterancesHotel Booking City New York City Check In Nov 30th Check Out Dec 2nd “Your hotel is booked for Nov 30th” Amazon Polly Confirmation: “Your hotel is booked for Nov 30th” Book Hotel NYC a in
  • 20. Amazon Kinesis AWS Lambda 1 Amazon CloudWatch Amazon DynamoDB AWS Lambda 2 Amazon S3 Real-time data processing: 1. Real-time event data sent to Amazon Kinesis allows multiple AWS Lambda functions to process the same events 2. In AWS Lambda, Function 1 processes and aggregates data from incoming events, then stores result data in Amazon DynamoDB 3. Lambda Function 1 also sends values to Amazon CloudWatch for simple monitoring of metrics 4. In AWS Lambda function, Function 2 does data manipulation of incoming events and stores results in Amazon S3 https://s3.amazonaws.com/awslambda-reference-architectures/stream-processing/lambda-refarch-streamprocessing.pdf Lambda + Kinesis
  • 21. Bustle.com Bustle.com is a news, entertainment, lifestyle, and fashion website catering to women: • 52 million monthly users • 100 million events daily • 84% cost savings • 0 servers • 0 operating system patches • Automatic scaling https://aws.amazon.com/solutions/case-studies/bustle/© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 22. Amazon API Gateway AWS Lambda Amazon Kinesis AWS Lambda Redis Amazon Mobile Analytics Amazon CloudWatch Amazon Elasticsearch Service Amazon S3 Amazon RedshiftAmazon QuickSightEngineering Marketing & Operations Design Bustle.com users Bustle.com event-stream processing
  • 23. Serverless distributed computing: PyWren PyWren prototype developed at University of California, Berkeley Uses Python with AWS Lambda stateless functions for large-scale data analytics Achieved @ 30-40 MB/s write and read performance per core to Amazon S3 object store Scaled to 60-80 GB/s across 2,800 simultaneous functions
  • 24. Square Enix Makers of Dragon Quest games: • Lambda processes 200-300 images uploaded per minute • Peak processing of 6,000 images per minute • Reduced image time from hours to only 10+ seconds at 1/20 the cost of their previous solution https://aws.amazon.com/solutions/case-studies/square-enix/© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 25. Home24 coordinating daily imports of marketing data European market leader in online shopping for home and living products, operating in eight countries and two continents Built a reliable, long-running serverless application to coordinate the daily import of gigabytes of social media data from 20+ sources for use in business analytics © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 26. How Home24 lowered costs by 99% Home24 sequenced a varying number of Lambda functions with AWS Step Functions to download and refine files from multiple sources • Cost savings: Saved 99% with AWS Step Functions as opposed to their previous SaaS solution • Productivity and agility: Engineers can easily coordinate various microservices to build ELT pipelines • Increased resilience: Automatic retries when service APIs are unavailable
  • 27. Build PCI- and HIPAA-compliant serverless applications! Serverless platform services that can be used in both: AWS Lambda Amazon S3 Amazon CloudFront Amazon DynamoDB Amazon Kinesis Streams Amazon Cognito Amazon API Gateway Amazon SNS © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Capital One Auto— Journey to Serverless
  • 29. Capital One • Top 10 US bank • Al exa Websi te Ranki ng says capi tal one.com traffi c i s “ 81st i n US Web Si tes” • Auto fi nanci ng — one mi l l i on hi ts/month
  • 31. Migration requirements • Full functionality and more • Secure—yes, we actually are a financial institution • Resilient (active/active) • Responsive—front-facing marketing home page, so initial load time is critical • SEO-friendly • Continuous deployments—changes on demand • Low-maintenance—it just needs to run • Use existing tools and processes in the enterprise—don’t reinvent the wheel • Logging • Monitoring • Deployments
  • 32. The painful old days • H o s t e d i n o n - p r e m i s e s d a t a c e n t e r • E n t e r p r i s e - w i d e c o m m o n d e p l o y m e n t s • O n e c a l e n d a r — f e a t u r e s p l a n n e d m o n t h s i n a d v a n c e • T i g h t c o u p l i n g b e t w e e n c o m p o n e n t s
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless migration—I Move to AWS Serverless content strategy
  • 34. App architecture—content Amazon Route 53 Amazon S3 Amazon S3 East Region West Region Amazon CloudFront Amazon CloudFront
  • 35. Amazon Route 53 Rest APIs EC2 EC2 EC2 EC2 WAF App AZ1 AZ2 AZ3 East EC2 EC2 EC2 EC2 WAF App AZ1 AZ2 AZ3 West App architecture—APIs
  • 36. CI/CD for content • A p p t e m p l a t e s i n G i t H u b • C o n t e n t i n C M S h o s t e d s e r v i c e • P r e - r e n d e r a n g u l a r c o n t e n t , S E O - f r i e n d l y • U s e A W S C L I t o p u s h c o n t e n t t o A m a z o n S 3 b u c k e t f o r w e b h o s t i n g Content Management System AWS CLI Amazon EC2 Build Server Content S3 Bucket
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless migration—II Lambda-based APIs CI/CD processes
  • 38. Move to serverless APIs Amazon Route 53 Rest APIs CapOne Enterprise Gateway Lambda Fn Amazon CloudWatch Lambda Fn East CapOne Enterprise Gateway Lambda Fn Amazon CloudWatch Lambda Fn West
  • 39. CI/CD—Lambda functions AWS CLI Deployment S3 Bucket Lambda Create Lambda Update Lamba Fn • L a m b d a c o d e i n G i t H u b • J e n k i n s - t r i g g e r e d b u i l d • U s e s A W S C L I • D e p l o y i n A m a z o n S 3 b u c k e t • C r e a t e / u p d a t e L a m b d a f u n c t i o n • O t h e r o p t i o n s : • S A M • S e r v e r l e s s f r a m e w o r k
  • 40. Benefits of serverless • Very simple architecture • Runs itself, less monitoring • Scales itself, no work on auto scaling needed • No worries on AMI rehydration, which keeps compliance and operations happy • Cost savings: • Conservative savings to tune of $50K/year • Amazon S3 web hosting eliminated any Amazon EC2 needs for website hosting • Able to eliminate 20 Amazon EC2 instances, CLBs, and Amazon EBS volumes from API architecture • Countless hours saved on operations of application
  • 41. Lessons learned • Migration can be a journey, so plan accordingly • Step-by-step progress is recommended • Start small • Serverless architectures are flexible and fungible • No one size fits all • Reuse tools and processes in the organization • Get stakeholder buy-in early
  • 42. FIN, ACK Serverless: • No servers to manage • No cost for idle • Automatic scaling • High availability Use cases: • Web applications • Backends • Data processing • Chatbots • Amazon Alexa • IT automation Integrated across AWS: • Amazon API Gateway • AWS Step Functions • Amazon S3 • Amazon Kinesis • Amazon DynamoDB • Amazon SNS • Amazon Cognito • AWS CloudFormation • AWS CodePipeline • Amazon CloudWatch • AWS IoT • Many more! © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 45. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you! R e m e m b e r t o r e v i e w t h i s s e s s i o n ! C M P 2 1 1