Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Using Machine Learning for Serverless Analytics

Using Machine Learning for Serverless Analytics

AWS Summit, Berlin, February 27th, 2019

Serverless is not just functions! The same approach can be used for different use cases, such as building batch or real-time analytics powered by fully-managed machine learning service. Extracting insights and actionable information from data requires a broad array of technology that can work with data in an efficient, scalable, and cost-effective way. In this session, we’ll implement step-by-step a serverless analytics platform that can process static content (such as files) and real-time data (such as video, audio, application logs, website clickstreams, and IoT telemetry), enrich data using API-driven machine learning services, query data instantly, and build visualizations to perform ad-hoc analysis.

Danilo Poccia

February 27, 2019
Tweet

More Decks by Danilo Poccia

Other Decks in Programming

Transcript

  1. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Using Machine Learning for Serverless Analytics Danilo Poccia Principal Evangelist, Serverless AWS @danilop
  2. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T What is serverless? No infrastructure provisioning, no management Automatic scaling Pay for value Highly available and secure
  3. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T More machine learning happens on AWS than anywhere else
  4. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T FRAMEWORKS AND INTERFACES ML for data scientists KERAS Frameworks Interfaces APPLICATION SERVICES ML for everyone PLATFORM SERVICES ML for engineers NVIDIA Tesla V100 GPUs (14x faster than P2) Machine Learning AMIs INFRASTRUCTURE Powering the ML Intel Xeon Skylake (Optimized for ML) A W S G R E E N G R A S S M L L E X P O L L Y R E K O G N I T I O N I M A G E & V I D E O T R A N S C R I B E T R A N S L A T E C O M P R E H E N D F O R E C A S T P E R S O N A L I Z E A M A Z O N S A G E M A K E R A W S D E E P L E N S S A G E M A K E R G R O U N D T R U T H & M E C H A N IC A L T U R K S P A R K & E M R
  5. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Can I build a completely serverless data analytics platform? Can I process both batch and streaming data? Can I use Machine Learning to get insights from data? What about text, audio, images, and videos?
  6. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files S3 Bucket AWS IoT Core
  7. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files S3 Bucket AWS IoT Core S3 Bucket
  8. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files S3 Bucket AWS IoT Core S3 Bucket • Validate syntax • Enrich data • External lookups • DynamoDB Table • RDS Database • Anything, it’s your code!
  9. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files S3 Bucket AWS IoT Core S3 Bucket
  10. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files S3 Bucket AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Core S3 Bucket
  11. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files S3 Bucket AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Core S3 Bucket • Integrated Data Catalog • Automatic schema discovery • Code generation • Developer endpoints • Flexible job scheduler
  12. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files S3 Bucket AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Core S3 Bucket
  13. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files S3 Bucket Amazon Athena AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Core S3 Bucket
  14. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files S3 Bucket Amazon Athena AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Core S3 Bucket • Analyze data in Amazon S3 using standard SQL • There is no infrastructure to manage • You pay only for the queries that you run
  15. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files S3 Bucket Amazon Athena AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Core S3 Bucket
  16. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files S3 Bucket Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Core S3 Bucket
  17. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files S3 Bucket Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Core S3 Bucket • Self-service business intelligence (BI) • Deliver rich, interactive dashboards for your readers • Pay-per-session pricing
  18. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files S3 Bucket Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Core S3 Bucket
  19. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Data Stream S3 Bucket Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Core Kinesis Data Firehose S3 Bucket
  20. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Data Stream S3 Bucket Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Core Kinesis Data Streams Kinesis Data Analytics Kinesis Data Firehose S3 Bucket
  21. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Data Stream S3 Bucket AWS IoT Core Kinesis Data Streams Kinesis Data Analytics Kinesis Data Firehose • Capture • Transform • Load data streams • Process data streams in real time with SQL and Java (Apache Flink) • Sliding windows • Tumbling windows • Use built-in functions that are optimized for stream processing • Anomaly detection • Top-K analysis • Process or analyze streaming data
  22. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Data Stream S3 Bucket Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Core Kinesis Data Streams Kinesis Data Analytics Kinesis Data Firehose S3 Bucket
  23. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Data Stream Video Stream S3 Bucket Kinesis Video Stream Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Core Kinesis Data Streams Kinesis Data Analytics Kinesis Data Firehose Outside of AWS S3 Bucket Custom Processing
  24. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Video Stream Kinesis Video Stream AWS IoT Core Custom Processing Securely stream video from connected devices to AWS for analytics, machine learning (ML), and other processing Kinesis Video Producer SDK • Gstreamer-plugin, • Docker images for Ubuntu, MacOS, and Raspberry Pi • Kinesis Video Streams applications get data, such as fragments and frames, from a Kinesis video stream to view, process, or analyze it • Get media with low-latency using the Kinesis Video Stream Parser Library Serverless But you may need it :)
  25. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Data Stream Video Stream S3 Bucket Kinesis Video Stream Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Core Kinesis Data Streams Kinesis Data Analytics Kinesis Data Firehose Outside of AWS S3 Bucket Custom Processing
  26. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Data Stream Video Stream S3 Bucket Kinesis Video Stream Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) IoT Device AWS IoT Core Kinesis Data Streams Kinesis Data Analytics Kinesis Data Firehose Outside of AWS S3 Bucket Custom Processing
  27. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Data Stream Video Stream S3 Bucket Kinesis Video Stream Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Analytics IoT Device AWS IoT Core Kinesis Data Streams Kinesis Data Analytics Kinesis Data Firehose Outside of AWS S3 Bucket Custom Processing
  28. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics AWS IoT Analytics IoT Device AWS IoT Core • Standard SQL queries • Run time-series analyses • Cleans false readings • Fill gaps in the data • Perform mathematical transformations of message data • Use Lambda functions to enrich your device data from external sources
  29. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Data Stream Video Stream S3 Bucket Kinesis Video Stream Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Analytics IoT Device AWS IoT Core Kinesis Data Streams Kinesis Data Analytics Kinesis Data Firehose Outside of AWS S3 Bucket Custom Processing
  30. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Data Stream Video Stream S3 Bucket Kinesis Video Stream Custom Processing Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Analytics IoT Device AWS IoT Core Kinesis Data Streams Kinesis Data Analytics Kinesis Data Firehose AWS Greengrass Outside of AWS S3 Bucket
  31. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Video Stream IoT Device AWS IoT Core AWS Greengrass Outside of AWS • Local compute (Lambda functions) • Messaging • Data caching • Synchronize data • ML inference Connected devices
  32. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Data Stream Video Stream S3 Bucket Kinesis Video Stream Custom Processing Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Analytics IoT Device AWS IoT Core Kinesis Data Streams Kinesis Data Analytics Kinesis Data Firehose AWS Greengrass Outside of AWS S3 Bucket
  33. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Data Stream Video Stream S3 Bucket Kinesis Video Stream Machine Learning Audio Image Video Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) AWS IoT Analytics IoT Device AWS IoT Core Kinesis Data Streams Kinesis Data Analytics Kinesis Data Firehose AWS Greengrass Outside of AWS Text Scanned Document S3 Bucket Custom Models Machine Learning
  34. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Data Stream Video Stream S3 Bucket Kinesis Video Stream Amazon Rekognition Amazon Rekognition Amazon Comprehend Amazon Transcribe Text Audio Image Video Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) Amazon SageMaker AWS IoT Analytics IoT Device AWS IoT Core Kinesis Data Streams Kinesis Data Analytics Kinesis Data Firehose AWS Greengrass Amazon Translate Amazon Textract Outside of AWS Text Scanned Document S3 Bucket Custom Models
  35. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Video Stream S3 Bucket Kinesis Video Stream Amazon Rekognition Amazon Rekognition Amazon Comprehend Amazon Transcribe Text Audio Image Video Amazon SageMaker Amazon Translate Amazon Textract Text Scanned Document Custom Models • Dominant language • Entities • Key Phrases • Sentiment • Topic Modeling • Transcribe to text • Labels • Faces • Celebrities • Moderation • Text • Tracking • Extracts text and data • Built-in algorithms • Your own algorithms • Marketplace for algorithms and models Same Lambda function for all formats, or different Lambda functions using object key name filtering (e.g. by suffix) • Translate to common languages
  36. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Video Stream S3 Bucket Kinesis Video Stream Amazon Rekognition Amazon Rekognition Amazon Comprehend Amazon Transcribe Text Audio Image Video Amazon SageMaker Amazon Translate Amazon Textract Text Scanned Document Custom Models Built-in algorithms • Linear Learner • Factorization Machines • XGBoost Algorithm • Image Classification Algorithm • Sequence to Sequence (seq2seq) • K-Means Algorithm • Principal Component Analysis (PCA) • Latent Dirichlet Allocation (LDA) • Neural Topic Model (NTM) • DeepAR Forecasting • BlazingText • Random Cut Forest • … Your own algorithms • TensorFlow • Apache MXNet • Chainer • PyTorch • Apache Spark • … AWS Marketplace • Algorithms • Models
  37. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Data Stream Video Stream S3 Bucket Kinesis Video Stream Amazon Rekognition Amazon Rekognition Amazon Comprehend Amazon Transcribe Text Audio Image Video Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) Amazon SageMaker AWS IoT Analytics IoT Device AWS IoT Core Kinesis Data Streams Kinesis Data Analytics Kinesis Data Firehose AWS Greengrass Amazon Translate Amazon Textract Outside of AWS Text Scanned Document S3 Bucket Custom Models
  38. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Data Stream Video Stream S3 Bucket Kinesis Video Stream Amazon Rekognition Amazon Rekognition Amazon Comprehend Amazon Transcribe Text Audio Image Video Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) Amazon SageMaker AWS IoT Analytics IoT Device AWS IoT Core Kinesis Data Streams Kinesis Data Analytics Kinesis Data Firehose AWS Greengrass Amazon Translate Amazon Textract Outside of AWS Text Scanned Document S3 Bucket Custom Models
  39. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Data Stream Video Stream S3 Bucket Kinesis Video Stream Amazon Rekognition Amazon Rekognition Amazon Comprehend Amazon Transcribe Text Audio Image Video Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) Amazon SageMaker AWS IoT Analytics IoT Device AWS IoT Core Kinesis Data Streams Kinesis Data Analytics Kinesis Data Firehose AWS Greengrass Amazon Forecast Amazon Personalize Amazon Translate Amazon Textract Outside of AWS Text Scanned Document S3 Bucket Custom Models
  40. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Amazon Forecast Amazon Personalize S3 Bucket Time-series forecasting Real-time personalization and recommendation
  41. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Serverless Machine Learning + Analytics Files Data Stream Video Stream S3 Bucket Kinesis Video Stream Amazon Rekognition Amazon Rekognition Amazon Comprehend Amazon Transcribe Text Audio Image Video Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) Amazon SageMaker AWS IoT Analytics IoT Device AWS IoT Core Kinesis Data Streams Kinesis Data Analytics Kinesis Data Firehose AWS Greengrass Amazon Forecast Amazon Personalize Amazon Translate Amazon Textract Outside of AWS Text Scanned Document S3 Bucket Custom Models Notebook
  42. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Lots is taken care of Security Monitoring Scalability Availability Cost Optimization
  43. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Use only the tools you need Batch or Real-time or IoT Images or Text Social Media Sentiment Analysis …
  44. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Data Format Optimization Partitioning Compression Columnar Formats (Parquet, ORC)
  45. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T It’s not just Serverless Amazon Redshift & Redshift Spectrum Amazon Elastic MapReduce (EMR) & Apache Spark Amazon SageMaker & Jupiter Notebooks
  46. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Database Freedom Graph – Amazon Neptune Time Series – Amazon Timestream Ledger – Amazon Quantum Ledger Database (QLDB)
  47. S U M M I T © 2019, Amazon Web

    Services, Inc. or its affiliates. All rights reserved.
  48. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Demo Files S3 Bucket Amazon Rekognition Amazon Comprehend Amazon Transcribe Text Audio Image Video Amazon Athena Amazon QuickSight AWS Glue (Crawlers, Jobs & Data Catalog) Amazon Translate Amazon Textract Text Scanned Document S3 Bucket
  49. Thank you! S U M M I T © 2019,

    Amazon Web Services, Inc. or its affiliates. All rights reserved. Danilo Poccia @danilop