SlideShare a Scribd company logo
1 of 30
Download to read offline
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Building Serverless
Machine Learning Workflows
Ronald Widha
Mgr. Solutions Architect
Amazon Web Services
A P I 3 1 5
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Who is this Chalk Talk for?
300 Level
ML Scientists
or build your own models using Amazon SageMaker
Data Engineers
You build data processing pipelines, or
automate data-related tasks
AI ML
Serverless Data Processing
Pipeline/Workflow
AI Developers
You use Amazon Lex, Amazon Rekognition, Amazon Comprehend
Chalk Talk
So, ask questions!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
• Data and machine learning
• Experimentation and continuous learning
• Three workflow patterns
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon S3
AWS Glue
AWS Data Pipeline
Amazon Kinesis
Streams to lakes
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon S3
AWS Glue
AWS Data Pipeline
Amazon Kinesis
Pulling the right tools in for analysis
Amazon EC2
Amazon Athena
Amazon EMR
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon S3
AWS Glue
AWS Data Pipeline
Amazon Kinesis
Leveraging Machine Learning
Amazon EC2
Amazon Athena
Amazon EMR
Amazon
SageMaker
Amazon
Polly
Amazon
Transcribe
Amazon
Comprehend
Amazon
Lex
Amazon
Rekognition
Video
Amazon
Translate
Amazon
Rekognition
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon S3
AWS Glue
AWS Data Pipeline
Amazon Kinesis
Preparing output for use
Amazon EC2
Amazon Athena
Amazon EMR
Amazon Redshift
Amazon ES
Amazon RDS
Amazon API
Gateway*
Amazon
SageMaker
Amazon
Polly
Amazon
Transcribe
Amazon
Comprehend
Amazon
Lex
Amazon
Rekognition
Amazon
Rekognition
Video
Amazon
Translate
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tens of thousands of customers running machine learning on AWS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Common patterns #1: Polyglot operational workflow
Ingest Data prep Training Infer Tuning
Machine Learning Workflow
Extract Transform Load Query
Analytics/Materialization Workflow
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Ingest Data prep Training Infer
Amazon Elastic Compute Cloud
(Amazon EC2)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
function handle(uri) {
// ingest
const podcastFeed = processPodcastFeed(uri)
// enrich
const vocabName =
createTranscribeVocabulary(podcastFeed)
for (let episode of podcastFeed.episodes) {
const transcript =
transcribe(episode, vocabName)
// mutate
index(transcript)
}
Transcribing podcast feed
Ingest
Enrich
Mutate
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
function handle(uri) {
// ingest
const podcastFeed = await processPodcastFeed(uri)
// enrich
const vocabName =
await createTranscribeVocabulary(podcastFeed)
for (let episode of podcastFeed.episodes) {
const transcript =
await transcribe(episode, vocabName)
// mutate
index(transcript)
}
}
Transcribing podcast feed
Concurrency
control
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
function handle(uri) {
try {
// ingest
const podcastFeed = await processPodcastFeed(uri)
// enrich
const vocabName =
await createTranscribeVocabulary(podcastFeed)
for (let episode of podcastFeed.episodes) {
const transcript =
await transcribe(episode, vocabName)
// mutate
index(transcript)
}
}
catch(e) { … }
}
Transcribing podcast feed – Error handling
Concurrency
control
Error handling
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
function handle(uri) {
try {
// ingest
const podcastFeed = await processPodcastFeed(uri)
// enrich
const vocabName =
await createTranscribeVocabulary(podcastFeed)
for (let episode of podcastFeed.episodes) {
const transcript =
await transcribe(episode, vocabName)
// mutate
index(transcript)
}
}
catch(e) { // if process fail, if transcribe fail }
}
Transcribing podcast feed – Error handling
Concurrency
control
Error handling
retries
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
function handle(uri) {
try {
// ingest
const podcastFeed = await processPodcastFeed(uri)
// enrich
const vocabName =
await createTranscribeVocabulary(podcastFeed)
for (let episode of podcastFeed.episodes) {
const transcript =
await transcribe(episode, vocabName)
// mutate
index(transcript)
}
catch(e) { // if process fail, if transcribe fail }
}
Transcribing podcast feed – State management
Concurrency
control
Operations?
Error handling
retries
State
management?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
function handle(uri) {
try {
// ingest
const podcastFeed = await processPodcastFeed(uri)
// enrich
const vocabName =
await createTranscribeVocabulary(podcastFeed)
for (let episode of podcastFeed.episodes) {
const transcript =
await transcribe(episode, vocabName)
// mutate
index(transcript)
}
catch(e) { // if process fail, if transcribe fail }
}
Transcribing podcast feed – Distributed systems
Concurrency
control
Operations?
Error handling
retries
State
management?
Process podcast RSS
Create custom vocabulary for Amazon Transcribe
Process podcast episodes
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Start
Process podcast RSS
Create custom vocabulary for Amazon Transcribe
Process podcast episodes
End
Start
Start
Start
Start
Process item
Process item
Process item
Process item
AWS Step
Functions
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
// ingest
const podcastFeed = await processPodcastFeed(uri)
// enrich
const vocabName =
await createTranscribeVocabulary(podcastFeed)
for (let episode of podcastFeed.episodes) {
const transcript =
await transcribe(episode, vocabName)
// mutate
index(transcript)
}
}
Common pattern #2:
Monitoring asynchronous processing
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Start
Process podcast RSS
Create custom vocabulary for Amazon Transcribe
Process podcast episodes
End
Start
Start
Start
Start
Process item
Process item
Process item
Process item
Is vocabulary completed?
Wait for vocabulary creation
Check vocabulary status
Wait 30 seconds
Are all episodes processed?
AWS Step
Functions
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Start
Process podcast RSS
Create custom vocabulary for Amazon Transcribe
Process podcast episodes
End
Start
Start
Start
Start
Process item
Process item
Process item
Process item
Is vocabulary completed?
Wait for vocabulary creation
Check vocabulary status
Wait 30 seconds
Are all episodes processed?
AWS Step
Functions
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Common pattern #3: Data available at all stages
Ingest Data prep Training Infer
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Start
Process podcast RSS
Create custom vocabulary for Amazon Transcribe
Process podcast episodes
End
Start
Start
Start
Start
Process item
Process item
Process item
Process item
Is vocabulary completed?
Wait for vocabulary creation
Check vocabulary status
Wait 30 seconds
Are all episodes processed?
AWS Step
Functions
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Start
Process podcast RSS
Create custom vocabulary for Amazon Transcribe
Process podcast episodes
End
Start
Start
Start
Start
Process item
Process item
Process item
Process item
Is vocabulary completed?
Wait for vocabulary creation
Check vocabulary status
Wait 30 seconds
Are all episodes processed?
Common pattern #4:
Child workflows
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ingest enrich mutate use
AWS Step
Functions
AWS Glue Amazon
SageMaker
Common pattern #4: Child workflows
Thank you!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Ronald Widha
@ronaldwidha
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS product and resource icons
(Updates coming August 2018)
Download icons to use in
your presentation here:
https://aws.amazon.com/
architecture/icons/

More Related Content

More from Amazon 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 AWS
Amazon 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 Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon 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
 
Protect your applications from DDoS/BOT & Advanced Attacks
Protect your applications from DDoS/BOT & Advanced AttacksProtect your applications from DDoS/BOT & Advanced Attacks
Protect your applications from DDoS/BOT & Advanced Attacks
Amazon Web Services
 
Track 6 Session 6_ 透過 AWS AI 服務模擬、部署機器人於產業之應用
Track 6 Session 6_ 透過 AWS AI 服務模擬、部署機器人於產業之應用Track 6 Session 6_ 透過 AWS AI 服務模擬、部署機器人於產業之應用
Track 6 Session 6_ 透過 AWS AI 服務模擬、部署機器人於產業之應用
Amazon Web Services
 

More from Amazon Web Services (20)

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
 
Come costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWSCome costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWS
 
AWS Serverless per startup: come innovare senza preoccuparsi dei server
AWS Serverless per startup: come innovare senza preoccuparsi dei serverAWS Serverless per startup: come innovare senza preoccuparsi dei server
AWS Serverless per startup: come innovare senza preoccuparsi dei server
 
Crea dashboard interattive con Amazon QuickSight
Crea dashboard interattive con Amazon QuickSightCrea dashboard interattive con Amazon QuickSight
Crea dashboard interattive con Amazon QuickSight
 
Costruisci modelli di Machine Learning con Amazon SageMaker Autopilot
Costruisci modelli di Machine Learning con Amazon SageMaker AutopilotCostruisci modelli di Machine Learning con Amazon SageMaker Autopilot
Costruisci modelli di Machine Learning con Amazon SageMaker Autopilot
 
Migra le tue file shares in cloud con FSx for Windows
Migra le tue file shares in cloud con FSx for Windows Migra le tue file shares in cloud con FSx for Windows
Migra le tue file shares in cloud con FSx for Windows
 
La tua organizzazione è pronta per adottare una strategia di cloud ibrido?
La tua organizzazione è pronta per adottare una strategia di cloud ibrido?La tua organizzazione è pronta per adottare una strategia di cloud ibrido?
La tua organizzazione è pronta per adottare una strategia di cloud ibrido?
 
Protect your applications from DDoS/BOT & Advanced Attacks
Protect your applications from DDoS/BOT & Advanced AttacksProtect your applications from DDoS/BOT & Advanced Attacks
Protect your applications from DDoS/BOT & Advanced Attacks
 
Track 6 Session 6_ 透過 AWS AI 服務模擬、部署機器人於產業之應用
Track 6 Session 6_ 透過 AWS AI 服務模擬、部署機器人於產業之應用Track 6 Session 6_ 透過 AWS AI 服務模擬、部署機器人於產業之應用
Track 6 Session 6_ 透過 AWS AI 服務模擬、部署機器人於產業之應用
 

Building Serverless Machine Learning Workflows (API315-R1) - AWS re:Invent 2018

  • 1.
  • 2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Building Serverless Machine Learning Workflows Ronald Widha Mgr. Solutions Architect Amazon Web Services A P I 3 1 5
  • 3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Who is this Chalk Talk for? 300 Level ML Scientists or build your own models using Amazon SageMaker Data Engineers You build data processing pipelines, or automate data-related tasks AI ML Serverless Data Processing Pipeline/Workflow AI Developers You use Amazon Lex, Amazon Rekognition, Amazon Comprehend Chalk Talk So, ask questions!
  • 4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda • Data and machine learning • Experimentation and continuous learning • Three workflow patterns
  • 5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon S3 AWS Glue AWS Data Pipeline Amazon Kinesis Streams to lakes
  • 6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon S3 AWS Glue AWS Data Pipeline Amazon Kinesis Pulling the right tools in for analysis Amazon EC2 Amazon Athena Amazon EMR
  • 7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon S3 AWS Glue AWS Data Pipeline Amazon Kinesis Leveraging Machine Learning Amazon EC2 Amazon Athena Amazon EMR Amazon SageMaker Amazon Polly Amazon Transcribe Amazon Comprehend Amazon Lex Amazon Rekognition Video Amazon Translate Amazon Rekognition
  • 8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon S3 AWS Glue AWS Data Pipeline Amazon Kinesis Preparing output for use Amazon EC2 Amazon Athena Amazon EMR Amazon Redshift Amazon ES Amazon RDS Amazon API Gateway* Amazon SageMaker Amazon Polly Amazon Transcribe Amazon Comprehend Amazon Lex Amazon Rekognition Amazon Rekognition Video Amazon Translate
  • 9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Tens of thousands of customers running machine learning on AWS
  • 10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Common patterns #1: Polyglot operational workflow Ingest Data prep Training Infer Tuning Machine Learning Workflow Extract Transform Load Query Analytics/Materialization Workflow
  • 11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Ingest Data prep Training Infer Amazon Elastic Compute Cloud (Amazon EC2)
  • 12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. function handle(uri) { // ingest const podcastFeed = processPodcastFeed(uri) // enrich const vocabName = createTranscribeVocabulary(podcastFeed) for (let episode of podcastFeed.episodes) { const transcript = transcribe(episode, vocabName) // mutate index(transcript) } Transcribing podcast feed Ingest Enrich Mutate
  • 13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. function handle(uri) { // ingest const podcastFeed = await processPodcastFeed(uri) // enrich const vocabName = await createTranscribeVocabulary(podcastFeed) for (let episode of podcastFeed.episodes) { const transcript = await transcribe(episode, vocabName) // mutate index(transcript) } } Transcribing podcast feed Concurrency control
  • 14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. function handle(uri) { try { // ingest const podcastFeed = await processPodcastFeed(uri) // enrich const vocabName = await createTranscribeVocabulary(podcastFeed) for (let episode of podcastFeed.episodes) { const transcript = await transcribe(episode, vocabName) // mutate index(transcript) } } catch(e) { … } } Transcribing podcast feed – Error handling Concurrency control Error handling
  • 15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. function handle(uri) { try { // ingest const podcastFeed = await processPodcastFeed(uri) // enrich const vocabName = await createTranscribeVocabulary(podcastFeed) for (let episode of podcastFeed.episodes) { const transcript = await transcribe(episode, vocabName) // mutate index(transcript) } } catch(e) { // if process fail, if transcribe fail } } Transcribing podcast feed – Error handling Concurrency control Error handling retries
  • 16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. function handle(uri) { try { // ingest const podcastFeed = await processPodcastFeed(uri) // enrich const vocabName = await createTranscribeVocabulary(podcastFeed) for (let episode of podcastFeed.episodes) { const transcript = await transcribe(episode, vocabName) // mutate index(transcript) } catch(e) { // if process fail, if transcribe fail } } Transcribing podcast feed – State management Concurrency control Operations? Error handling retries State management?
  • 17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. function handle(uri) { try { // ingest const podcastFeed = await processPodcastFeed(uri) // enrich const vocabName = await createTranscribeVocabulary(podcastFeed) for (let episode of podcastFeed.episodes) { const transcript = await transcribe(episode, vocabName) // mutate index(transcript) } catch(e) { // if process fail, if transcribe fail } } Transcribing podcast feed – Distributed systems Concurrency control Operations? Error handling retries State management? Process podcast RSS Create custom vocabulary for Amazon Transcribe Process podcast episodes
  • 18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Start Process podcast RSS Create custom vocabulary for Amazon Transcribe Process podcast episodes End Start Start Start Start Process item Process item Process item Process item AWS Step Functions
  • 19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. // ingest const podcastFeed = await processPodcastFeed(uri) // enrich const vocabName = await createTranscribeVocabulary(podcastFeed) for (let episode of podcastFeed.episodes) { const transcript = await transcribe(episode, vocabName) // mutate index(transcript) } } Common pattern #2: Monitoring asynchronous processing
  • 21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Start Process podcast RSS Create custom vocabulary for Amazon Transcribe Process podcast episodes End Start Start Start Start Process item Process item Process item Process item Is vocabulary completed? Wait for vocabulary creation Check vocabulary status Wait 30 seconds Are all episodes processed? AWS Step Functions
  • 22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Start Process podcast RSS Create custom vocabulary for Amazon Transcribe Process podcast episodes End Start Start Start Start Process item Process item Process item Process item Is vocabulary completed? Wait for vocabulary creation Check vocabulary status Wait 30 seconds Are all episodes processed? AWS Step Functions
  • 23. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Common pattern #3: Data available at all stages Ingest Data prep Training Infer
  • 25. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Start Process podcast RSS Create custom vocabulary for Amazon Transcribe Process podcast episodes End Start Start Start Start Process item Process item Process item Process item Is vocabulary completed? Wait for vocabulary creation Check vocabulary status Wait 30 seconds Are all episodes processed? AWS Step Functions
  • 26. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Start Process podcast RSS Create custom vocabulary for Amazon Transcribe Process podcast episodes End Start Start Start Start Process item Process item Process item Process item Is vocabulary completed? Wait for vocabulary creation Check vocabulary status Wait 30 seconds Are all episodes processed? Common pattern #4: Child workflows
  • 27. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. ingest enrich mutate use AWS Step Functions AWS Glue Amazon SageMaker Common pattern #4: Child workflows
  • 28. Thank you! © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Ronald Widha @ronaldwidha
  • 29. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 30. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS product and resource icons (Updates coming August 2018) Download icons to use in your presentation here: https://aws.amazon.com/ architecture/icons/