SlideShare une entreprise Scribd logo
1  sur  36
Télécharger pour lire hors ligne
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Sebastien Linsolas
AWS Solutions Architect
Analyzing Streaming Data in Real-time
with Amazon Kinesis
Level 200
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Agenda
• Why Real-Time Analytics?
• What Is Real-Time Data?
• What Real-Time Services Does AWS Offer?
• Common Use Cases
• Deep Dive
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Why Real-Time Analytics?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Hourly server logs
Weekly or monthly bills
Daily web-site clickstream
Daily fraud reports
Real time metrics
Real time spending alerts/caps
Real time clickstream analysis
Real time detection
It’s All About the Pace
Batch Processing Stream Processing
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
A Day in Life
Acknowledgement: Icon created by Iconicbestiary - Freepik.com
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Data Loses Value Over Time
Ingest data as it is generated
Analyze data in real time to get
insights immediately
Deliver data to in seconds instead
of hours
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What Is Real-Time Data?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What Is Real Time Data?
Mobile Apps Web Clickstream Application Logs
Metering Records IoT Sensors Smart Buildings
[Wed Oct 11 14:32:52
2000] [error] [client
127.0.0.1] client denied
by server configuration:
/export/home/live/ap/htdo
cs/test
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Simple Pattern for Streaming Data
Continuously creates
data
Continuously writes
data to a stream
Can be almost anything
Data Producer
Durably stores data
Provides temporary
buffer that preps data
Supports very high-
throughput
Streaming Service
Continuously processes
data
Cleans, prepares, &
aggregates
Transforms data to
information
Data Consumer
Mobile Client Stream Application
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What Real-Time Services Does
AWS Offer?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Kinesis
Amazon Kinesis
Data Streams
Amazon Kinesis
Data Analytics
Amazon Kinesis
Data Firehose
Build custom
applications that process
and analyze streaming
data
Easily process and
analyze streaming data
with standard SQL
Easily load streaming
data into AWS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Kinesis Data Streams
• Easy administration and low cost
• Build real-time application with framework of choice
• Secure, Durable storage
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Kinesis Data Firehose
Amazon S3
Amazon Redshift
• Zero administration and seamless elasticity
• Direct-to-data store integration
• Serverless, continuous data transformation
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Stream Data To Amazon Kinesis
Automatic ingestion Easy setup Write your own
Amazon
VPC Flow
Logs
Elastic Load
Balancing
Amazon
RDS
Amazon
CloudWatch
Logs
AWS
CloudTrail
Event Logs
Amazon
Pinpoint
Amazon API
Gateway
AWS IoT
events
AWS SDKs
Amazon
DynamoDB
Amazon
Kinesis Agent
Amazon
Kinesis
Producer
Library
As a proxy:
For change data capture:
Just a sample… many more ways stream data to Amazon Kinesis
Integrate With Your Current Solution
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Kinesis Data Analytics
• Continuous anomaly detection
• Continuous time series analysis
• Continuous filtering
• Continuous aggregation
• Continuous enrichment
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Kinesis Data Analytics Applications
Easily write SQL code to process streaming data
Connect to streaming source
Continuously deliver SQL results
Amazon Kinesis Customers
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Common Use Cases
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Three Common Scenarios
Streaming
Ingest-
Transform-Load
Continuous
Metric
Generation
Actionable
Insights
Compute analytics as the data is generated
React to analytics based off of insights
Deliver data to analytics tools faster and
cheaper
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Web Analytics and Leaderboards
Amazon
Kinesis Data
Analytics
AWS
Lambda
function
Amazon
Cognito
Lightweight JS
client code
Web Server on
Amazon EC2
Instance
OR
Amazon
DynamoDB
Table
Amazon
Kinesis Data
Streams
Compute top 10 usersIngest web app data Persist to feed live apps
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Monitoring IoT Devices
IoT sensors AWS IoT
Amazon
RDS
MySQL DB
instance
Amazon
Kinesis
Data
Streams
Amazon
Kinesis
Data
Analytics
AWS
Lambda function
Compute avg temp
every 10 sec
Ingest sensor data
Persist time series
analytic to database
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Analyzing CloudTrail Event Logs
AWS
CloudTrail
Amazon
CloudWatch
events trigger
Amazon
Kinesis
Data Analytics
AWS
Lambda
function
Amazon S3
bucket for raw
data
Amazon S3
bucket for
processed data
Amazon
DynamoDB
Table(s)
Chart.JS
Dashboard
Compute
operational metrics
Ingest and deliver raw
log data
Deliver to a real time
dashboards and archival
Amazon Kinesis
Data Firehose
Amazon Kinesis
Data Firehose
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Deep Dive into
Analyzing FX Pricing in Near Real
Time
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Analyzing FX Pricing in Near Real-Time
Connector to
retrieve FX
Pricing
Amazon
Kinesis
Data Analytics
AWS
ElasticSearchAmazon S3
bucket for raw
data
Amazon S3
bucket for
processed data
Enrich Data
Ingest and Deliver Raw
FX Pricing Data
Real-Time Notification +
Dashboard
Amazon Kinesis
Data Firehose
Amazon Kinesis
Data Firehose
AWS
Lambda function
Amazon SNS
Notification
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Ingest and Deliver FX Pricing
• An application is connected to a Market
Data provider delivering FX pricing, every
30 seconds
• Pricing are sent in real time (to near real
time) to Kinesis Data Firehose or Streams
• Each pricing in JSON is in below format
Market Data
Application
Amazon S3
bucket for raw
data
Amazon Kinesis
Data Firehose
{
"ask": 212.2553,
"timestamp": 1515484223,
"symbol": "XAGZAR",
"bid": 211.6336,
"price": 211.9445
}
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Compute Pricing Metrics in Near Real-Time
Compute metrics using SQL in real time
like:
• Max, Min and Average price for the past
hour
• Previous Price and Price Change
Amazon
Kinesis
Data Analytics
Raw data Real time
analytics
{
"min": 212.2553,
"timestamp": 1515484223,
"symbol": "XAGZAR",
"max": 211.6336,
"average": 211.9445
"change": 1.1954
"previous_price ": 210.7491
"price ": 211.9445
}
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How Do I Write Streaming SQL? Easy!
Streams (in memory tables)
CREATE OR REPLACE STREAM DESTINATION_SQL_STREAM(
"@timestamp" BIGINT,
symbol VARCHAR(8),
min_price DOUBLE,
max_price DOUBLE,
avg_price DOUBLE,
previous_price DOUBLE,
new_price DOUBLE
change DOUBLE
);
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How Do I Write Streaming SQL? Easy!
Pumps (continuous query)
CREATE OR REPLACE PUMP "STREAM_PUMP" AS
INSERT INTO "DESTINATION_SQL_STREAM"
SELECT STREAM "COL_timestamp” * 1000,
"ticker_symbol",
MIN("price") OVER W1 as min_price,
MAX("price") OVER W1 as max_price,
AVG("price") OVER W1 as avg_price,
FIRST_VALUE("price")OVER R1 as previous_price,
"price" as new_price,
"price" – FIRST_VALUE("price") OVER R1 as CHANGE
FROM "SOURCE_SQL_STREAM_001”
WINDOW
W1 AS (PARTITION BY "ticker_symbol" RANGE INTERVAL '1' HOUR PRECEDING),
R1 AS (PARTITION BY "ticker_symbol" ROWS 1 PRECEDING)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How Do We Aggregate Streaming Data?
• Aggregations (count, sum, min,…) take granular real time data and
turn it into insights
• Data is continuously processed so you need to tell the application
when you want results
Windows!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Window Types
• Sliding, tumbling, and custom windows
• Tumbling windows are fixed size and grouped keys do not overlap
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Real-Time Notification & Dashboard
• Use Kinesis Data
Firehose to archive
processed data in S3
• Use AWS Lambda to
generate notification
• Open source or other
tools to visualize the
data
Real time
analytics
AWS
ElasticSearch
Amazon S3
bucket for
processed data
Amazon Kinesis
Data Firehose
AWS
Lambda function
Amazon SNS
Notification
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Where To Go Next?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Getting Started
• Kinesis Home Page: https://aws.amazon.com/kinesis/
• Kinesis Blog Post: https://aws.amazon.com/kinesis/blog-posts/
• Getting Started Page: https://aws.amazon.com/kinesis/getting-started/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
THANK YOU!

Contenu connexe

Tendances

From Batch to Streaming - How Amazon Flex Uses Real-time Analytics
From Batch to Streaming - How Amazon Flex Uses Real-time AnalyticsFrom Batch to Streaming - How Amazon Flex Uses Real-time Analytics
From Batch to Streaming - How Amazon Flex Uses Real-time AnalyticsAmazon Web Services
 
AWS Storage - S3 Fundamentals
AWS Storage - S3 FundamentalsAWS Storage - S3 Fundamentals
AWS Storage - S3 FundamentalsPiyush Agrawal
 
Introduction to AWS Organizations
Introduction to AWS OrganizationsIntroduction to AWS Organizations
Introduction to AWS OrganizationsAmazon Web Services
 
AWS May Webinar Series - Getting Started: Storage with Amazon S3 and Amazon G...
AWS May Webinar Series - Getting Started: Storage with Amazon S3 and Amazon G...AWS May Webinar Series - Getting Started: Storage with Amazon S3 and Amazon G...
AWS May Webinar Series - Getting Started: Storage with Amazon S3 and Amazon G...Amazon Web Services
 
AWS S3 | Tutorial For Beginners | AWS S3 Bucket Tutorial | AWS Tutorial For B...
AWS S3 | Tutorial For Beginners | AWS S3 Bucket Tutorial | AWS Tutorial For B...AWS S3 | Tutorial For Beginners | AWS S3 Bucket Tutorial | AWS Tutorial For B...
AWS S3 | Tutorial For Beginners | AWS S3 Bucket Tutorial | AWS Tutorial For B...Simplilearn
 
민첩하고 비용효율적인 Data Lake 구축 - 문종민 솔루션즈 아키텍트, AWS
민첩하고 비용효율적인 Data Lake 구축 - 문종민 솔루션즈 아키텍트, AWS민첩하고 비용효율적인 Data Lake 구축 - 문종민 솔루션즈 아키텍트, AWS
민첩하고 비용효율적인 Data Lake 구축 - 문종민 솔루션즈 아키텍트, AWSAmazon Web Services Korea
 
AWS Summit Seoul 2023 | 실시간 CDC 데이터 처리! Modern Transactional Data Lake 구축하기
AWS Summit Seoul 2023 | 실시간 CDC 데이터 처리! Modern Transactional Data Lake 구축하기AWS Summit Seoul 2023 | 실시간 CDC 데이터 처리! Modern Transactional Data Lake 구축하기
AWS Summit Seoul 2023 | 실시간 CDC 데이터 처리! Modern Transactional Data Lake 구축하기Amazon Web Services Korea
 
Simplify & Standardise Your Migration to AWS with a Migration Landing Zone
Simplify & Standardise Your Migration to AWS with a Migration Landing ZoneSimplify & Standardise Your Migration to AWS with a Migration Landing Zone
Simplify & Standardise Your Migration to AWS with a Migration Landing ZoneAmazon Web Services
 
Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...
Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...
Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...Amazon Web Services
 
AWS basics
AWS basicsAWS basics
AWS basicsmbaric
 

Tendances (20)

From Batch to Streaming - How Amazon Flex Uses Real-time Analytics
From Batch to Streaming - How Amazon Flex Uses Real-time AnalyticsFrom Batch to Streaming - How Amazon Flex Uses Real-time Analytics
From Batch to Streaming - How Amazon Flex Uses Real-time Analytics
 
Building-a-Data-Lake-on-AWS
Building-a-Data-Lake-on-AWSBuilding-a-Data-Lake-on-AWS
Building-a-Data-Lake-on-AWS
 
Introduction to Amazon Redshift
Introduction to Amazon RedshiftIntroduction to Amazon Redshift
Introduction to Amazon Redshift
 
AWS Basics .pdf
AWS Basics .pdfAWS Basics .pdf
AWS Basics .pdf
 
AWS Storage - S3 Fundamentals
AWS Storage - S3 FundamentalsAWS Storage - S3 Fundamentals
AWS Storage - S3 Fundamentals
 
Azure storage
Azure storageAzure storage
Azure storage
 
Amazon S3 Masterclass
Amazon S3 MasterclassAmazon S3 Masterclass
Amazon S3 Masterclass
 
Introduction to Amazon EC2
Introduction to Amazon EC2Introduction to Amazon EC2
Introduction to Amazon EC2
 
Introduction to AWS Organizations
Introduction to AWS OrganizationsIntroduction to AWS Organizations
Introduction to AWS Organizations
 
AWS May Webinar Series - Getting Started: Storage with Amazon S3 and Amazon G...
AWS May Webinar Series - Getting Started: Storage with Amazon S3 and Amazon G...AWS May Webinar Series - Getting Started: Storage with Amazon S3 and Amazon G...
AWS May Webinar Series - Getting Started: Storage with Amazon S3 and Amazon G...
 
Cost Optimisation on AWS
Cost Optimisation on AWSCost Optimisation on AWS
Cost Optimisation on AWS
 
AWS S3 | Tutorial For Beginners | AWS S3 Bucket Tutorial | AWS Tutorial For B...
AWS S3 | Tutorial For Beginners | AWS S3 Bucket Tutorial | AWS Tutorial For B...AWS S3 | Tutorial For Beginners | AWS S3 Bucket Tutorial | AWS Tutorial For B...
AWS S3 | Tutorial For Beginners | AWS S3 Bucket Tutorial | AWS Tutorial For B...
 
민첩하고 비용효율적인 Data Lake 구축 - 문종민 솔루션즈 아키텍트, AWS
민첩하고 비용효율적인 Data Lake 구축 - 문종민 솔루션즈 아키텍트, AWS민첩하고 비용효율적인 Data Lake 구축 - 문종민 솔루션즈 아키텍트, AWS
민첩하고 비용효율적인 Data Lake 구축 - 문종민 솔루션즈 아키텍트, AWS
 
AWS Summit Seoul 2023 | 실시간 CDC 데이터 처리! Modern Transactional Data Lake 구축하기
AWS Summit Seoul 2023 | 실시간 CDC 데이터 처리! Modern Transactional Data Lake 구축하기AWS Summit Seoul 2023 | 실시간 CDC 데이터 처리! Modern Transactional Data Lake 구축하기
AWS Summit Seoul 2023 | 실시간 CDC 데이터 처리! Modern Transactional Data Lake 구축하기
 
Simplify & Standardise Your Migration to AWS with a Migration Landing Zone
Simplify & Standardise Your Migration to AWS with a Migration Landing ZoneSimplify & Standardise Your Migration to AWS with a Migration Landing Zone
Simplify & Standardise Your Migration to AWS with a Migration Landing Zone
 
Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...
Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...
Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...
 
Enterprise workloads on AWS
Enterprise workloads on AWSEnterprise workloads on AWS
Enterprise workloads on AWS
 
AWS basics
AWS basicsAWS basics
AWS basics
 
What is AWS Glue
What is AWS GlueWhat is AWS Glue
What is AWS Glue
 
Amazon QuickSight
Amazon QuickSightAmazon QuickSight
Amazon QuickSight
 

Similaire à Analyzing Streaming Data in Real-time with Amazon Kinesis

ABD301-Analyzing Streaming Data in Real Time with Amazon Kinesis
ABD301-Analyzing Streaming Data in Real Time with Amazon KinesisABD301-Analyzing Streaming Data in Real Time with Amazon Kinesis
ABD301-Analyzing Streaming Data in Real Time with Amazon KinesisAmazon Web Services
 
Building a Real-Time Data Platform on AWS
Building a Real-Time Data Platform on AWSBuilding a Real-Time Data Platform on AWS
Building a Real-Time Data Platform on AWSInjae Kwak
 
GAM310_Build a Telemetry and Analytics Pipeline for Game Balancing
GAM310_Build a Telemetry and Analytics Pipeline for Game BalancingGAM310_Build a Telemetry and Analytics Pipeline for Game Balancing
GAM310_Build a Telemetry and Analytics Pipeline for Game BalancingAmazon Web Services
 
How TrueCar Gains Actionable Insights with Splunk Cloud PPT
How TrueCar Gains Actionable Insights with Splunk Cloud PPTHow TrueCar Gains Actionable Insights with Splunk Cloud PPT
How TrueCar Gains Actionable Insights with Splunk Cloud PPTAmazon Web Services
 
Analyzing Streams: Data Analytics Week SF
Analyzing Streams: Data Analytics Week SFAnalyzing Streams: Data Analytics Week SF
Analyzing Streams: Data Analytics Week SFAmazon Web Services
 
Analyzing Streams: Data Analytics Week at the SF Loft
Analyzing Streams: Data Analytics Week at the SF LoftAnalyzing Streams: Data Analytics Week at the SF Loft
Analyzing Streams: Data Analytics Week at the SF LoftAmazon Web Services
 
Serverless Stream Processing Tips & Tricks - BDA311 - Chicago AWS Summit
Serverless Stream Processing Tips & Tricks - BDA311 - Chicago AWS SummitServerless Stream Processing Tips & Tricks - BDA311 - Chicago AWS Summit
Serverless Stream Processing Tips & Tricks - BDA311 - Chicago AWS SummitAmazon Web Services
 
ABD203_Real-Time Streaming Applications on AWS
ABD203_Real-Time Streaming Applications on AWSABD203_Real-Time Streaming Applications on AWS
ABD203_Real-Time Streaming Applications on AWSAmazon Web Services
 
Real-time Analytics using Data from IoT Devices - AWS Online Tech Talks
Real-time Analytics using Data from IoT Devices - AWS Online Tech TalksReal-time Analytics using Data from IoT Devices - AWS Online Tech Talks
Real-time Analytics using Data from IoT Devices - AWS Online Tech TalksAmazon Web Services
 
Real Time Data Ingestion & Analysis - AWS Summit Sydney 2018
Real Time Data Ingestion & Analysis - AWS Summit Sydney 2018Real Time Data Ingestion & Analysis - AWS Summit Sydney 2018
Real Time Data Ingestion & Analysis - AWS Summit Sydney 2018Amazon Web Services
 
Serverless Stream Processing Tips & Tricks (ANT358) - AWS re:Invent 2018
Serverless Stream Processing Tips & Tricks (ANT358) - AWS re:Invent 2018Serverless Stream Processing Tips & Tricks (ANT358) - AWS re:Invent 2018
Serverless Stream Processing Tips & Tricks (ANT358) - AWS re:Invent 2018Amazon Web Services
 
Serverless Stream Processing Pipeline Best Practices (SRV316-R1) - AWS re:Inv...
Serverless Stream Processing Pipeline Best Practices (SRV316-R1) - AWS re:Inv...Serverless Stream Processing Pipeline Best Practices (SRV316-R1) - AWS re:Inv...
Serverless Stream Processing Pipeline Best Practices (SRV316-R1) - AWS re:Inv...Amazon Web Services
 
ABD335_Real-Time Anomaly Detection Using Amazon Kinesis
ABD335_Real-Time Anomaly Detection Using Amazon KinesisABD335_Real-Time Anomaly Detection Using Amazon Kinesis
ABD335_Real-Time Anomaly Detection Using Amazon KinesisAmazon Web Services
 
Fanatics Ingests Streaming Data to a Data Lake on AWS
Fanatics Ingests Streaming Data to a Data Lake on AWSFanatics Ingests Streaming Data to a Data Lake on AWS
Fanatics Ingests Streaming Data to a Data Lake on AWSAmazon Web Services
 
How Amazon.com uses AWS Analytics
How Amazon.com uses AWS AnalyticsHow Amazon.com uses AWS Analytics
How Amazon.com uses AWS AnalyticsAmazon Web Services
 

Similaire à Analyzing Streaming Data in Real-time with Amazon Kinesis (20)

ABD301-Analyzing Streaming Data in Real Time with Amazon Kinesis
ABD301-Analyzing Streaming Data in Real Time with Amazon KinesisABD301-Analyzing Streaming Data in Real Time with Amazon Kinesis
ABD301-Analyzing Streaming Data in Real Time with Amazon Kinesis
 
Building a Real-Time Data Platform on AWS
Building a Real-Time Data Platform on AWSBuilding a Real-Time Data Platform on AWS
Building a Real-Time Data Platform on AWS
 
GAM310_Build a Telemetry and Analytics Pipeline for Game Balancing
GAM310_Build a Telemetry and Analytics Pipeline for Game BalancingGAM310_Build a Telemetry and Analytics Pipeline for Game Balancing
GAM310_Build a Telemetry and Analytics Pipeline for Game Balancing
 
How TrueCar Gains Actionable Insights with Splunk Cloud PPT
How TrueCar Gains Actionable Insights with Splunk Cloud PPTHow TrueCar Gains Actionable Insights with Splunk Cloud PPT
How TrueCar Gains Actionable Insights with Splunk Cloud PPT
 
Analyzing Streams: Data Analytics Week SF
Analyzing Streams: Data Analytics Week SFAnalyzing Streams: Data Analytics Week SF
Analyzing Streams: Data Analytics Week SF
 
Analyzing Streams: Data Analytics Week at the SF Loft
Analyzing Streams: Data Analytics Week at the SF LoftAnalyzing Streams: Data Analytics Week at the SF Loft
Analyzing Streams: Data Analytics Week at the SF Loft
 
Analyzing Streams
Analyzing StreamsAnalyzing Streams
Analyzing Streams
 
Analyzing Streams
Analyzing StreamsAnalyzing Streams
Analyzing Streams
 
Analyzing Streams
Analyzing StreamsAnalyzing Streams
Analyzing Streams
 
Serverless Stream Processing Tips & Tricks - BDA311 - Chicago AWS Summit
Serverless Stream Processing Tips & Tricks - BDA311 - Chicago AWS SummitServerless Stream Processing Tips & Tricks - BDA311 - Chicago AWS Summit
Serverless Stream Processing Tips & Tricks - BDA311 - Chicago AWS Summit
 
ABD203_Real-Time Streaming Applications on AWS
ABD203_Real-Time Streaming Applications on AWSABD203_Real-Time Streaming Applications on AWS
ABD203_Real-Time Streaming Applications on AWS
 
Real-time Analytics using Data from IoT Devices - AWS Online Tech Talks
Real-time Analytics using Data from IoT Devices - AWS Online Tech TalksReal-time Analytics using Data from IoT Devices - AWS Online Tech Talks
Real-time Analytics using Data from IoT Devices - AWS Online Tech Talks
 
Real Time Data Ingestion & Analysis - AWS Summit Sydney 2018
Real Time Data Ingestion & Analysis - AWS Summit Sydney 2018Real Time Data Ingestion & Analysis - AWS Summit Sydney 2018
Real Time Data Ingestion & Analysis - AWS Summit Sydney 2018
 
Serverless Stream Processing Tips & Tricks (ANT358) - AWS re:Invent 2018
Serverless Stream Processing Tips & Tricks (ANT358) - AWS re:Invent 2018Serverless Stream Processing Tips & Tricks (ANT358) - AWS re:Invent 2018
Serverless Stream Processing Tips & Tricks (ANT358) - AWS re:Invent 2018
 
Analyzing Streams
Analyzing StreamsAnalyzing Streams
Analyzing Streams
 
Serverless Stream Processing Pipeline Best Practices (SRV316-R1) - AWS re:Inv...
Serverless Stream Processing Pipeline Best Practices (SRV316-R1) - AWS re:Inv...Serverless Stream Processing Pipeline Best Practices (SRV316-R1) - AWS re:Inv...
Serverless Stream Processing Pipeline Best Practices (SRV316-R1) - AWS re:Inv...
 
ABD335_Real-Time Anomaly Detection Using Amazon Kinesis
ABD335_Real-Time Anomaly Detection Using Amazon KinesisABD335_Real-Time Anomaly Detection Using Amazon Kinesis
ABD335_Real-Time Anomaly Detection Using Amazon Kinesis
 
ABD217_From Batch to Streaming
ABD217_From Batch to StreamingABD217_From Batch to Streaming
ABD217_From Batch to Streaming
 
Fanatics Ingests Streaming Data to a Data Lake on AWS
Fanatics Ingests Streaming Data to a Data Lake on AWSFanatics Ingests Streaming Data to a Data Lake on AWS
Fanatics Ingests Streaming Data to a Data Lake on AWS
 
How Amazon.com uses AWS Analytics
How Amazon.com uses AWS AnalyticsHow Amazon.com uses AWS Analytics
How Amazon.com uses AWS Analytics
 

Plus de 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
 

Plus de 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
 

Analyzing Streaming Data in Real-time with Amazon Kinesis

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Sebastien Linsolas AWS Solutions Architect Analyzing Streaming Data in Real-time with Amazon Kinesis Level 200
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Agenda • Why Real-Time Analytics? • What Is Real-Time Data? • What Real-Time Services Does AWS Offer? • Common Use Cases • Deep Dive
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Why Real-Time Analytics?
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Hourly server logs Weekly or monthly bills Daily web-site clickstream Daily fraud reports Real time metrics Real time spending alerts/caps Real time clickstream analysis Real time detection It’s All About the Pace Batch Processing Stream Processing
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. A Day in Life Acknowledgement: Icon created by Iconicbestiary - Freepik.com
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Data Loses Value Over Time Ingest data as it is generated Analyze data in real time to get insights immediately Deliver data to in seconds instead of hours
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What Is Real-Time Data?
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What Is Real Time Data? Mobile Apps Web Clickstream Application Logs Metering Records IoT Sensors Smart Buildings [Wed Oct 11 14:32:52 2000] [error] [client 127.0.0.1] client denied by server configuration: /export/home/live/ap/htdo cs/test
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Simple Pattern for Streaming Data Continuously creates data Continuously writes data to a stream Can be almost anything Data Producer Durably stores data Provides temporary buffer that preps data Supports very high- throughput Streaming Service Continuously processes data Cleans, prepares, & aggregates Transforms data to information Data Consumer Mobile Client Stream Application
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What Real-Time Services Does AWS Offer?
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Kinesis Amazon Kinesis Data Streams Amazon Kinesis Data Analytics Amazon Kinesis Data Firehose Build custom applications that process and analyze streaming data Easily process and analyze streaming data with standard SQL Easily load streaming data into AWS
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Kinesis Data Streams • Easy administration and low cost • Build real-time application with framework of choice • Secure, Durable storage
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Kinesis Data Firehose Amazon S3 Amazon Redshift • Zero administration and seamless elasticity • Direct-to-data store integration • Serverless, continuous data transformation
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Stream Data To Amazon Kinesis Automatic ingestion Easy setup Write your own Amazon VPC Flow Logs Elastic Load Balancing Amazon RDS Amazon CloudWatch Logs AWS CloudTrail Event Logs Amazon Pinpoint Amazon API Gateway AWS IoT events AWS SDKs Amazon DynamoDB Amazon Kinesis Agent Amazon Kinesis Producer Library As a proxy: For change data capture: Just a sample… many more ways stream data to Amazon Kinesis
  • 15. Integrate With Your Current Solution
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Kinesis Data Analytics • Continuous anomaly detection • Continuous time series analysis • Continuous filtering • Continuous aggregation • Continuous enrichment
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Kinesis Data Analytics Applications Easily write SQL code to process streaming data Connect to streaming source Continuously deliver SQL results
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Common Use Cases
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Three Common Scenarios Streaming Ingest- Transform-Load Continuous Metric Generation Actionable Insights Compute analytics as the data is generated React to analytics based off of insights Deliver data to analytics tools faster and cheaper
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Web Analytics and Leaderboards Amazon Kinesis Data Analytics AWS Lambda function Amazon Cognito Lightweight JS client code Web Server on Amazon EC2 Instance OR Amazon DynamoDB Table Amazon Kinesis Data Streams Compute top 10 usersIngest web app data Persist to feed live apps
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Monitoring IoT Devices IoT sensors AWS IoT Amazon RDS MySQL DB instance Amazon Kinesis Data Streams Amazon Kinesis Data Analytics AWS Lambda function Compute avg temp every 10 sec Ingest sensor data Persist time series analytic to database
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Analyzing CloudTrail Event Logs AWS CloudTrail Amazon CloudWatch events trigger Amazon Kinesis Data Analytics AWS Lambda function Amazon S3 bucket for raw data Amazon S3 bucket for processed data Amazon DynamoDB Table(s) Chart.JS Dashboard Compute operational metrics Ingest and deliver raw log data Deliver to a real time dashboards and archival Amazon Kinesis Data Firehose Amazon Kinesis Data Firehose
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Deep Dive into Analyzing FX Pricing in Near Real Time
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Analyzing FX Pricing in Near Real-Time Connector to retrieve FX Pricing Amazon Kinesis Data Analytics AWS ElasticSearchAmazon S3 bucket for raw data Amazon S3 bucket for processed data Enrich Data Ingest and Deliver Raw FX Pricing Data Real-Time Notification + Dashboard Amazon Kinesis Data Firehose Amazon Kinesis Data Firehose AWS Lambda function Amazon SNS Notification
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Ingest and Deliver FX Pricing • An application is connected to a Market Data provider delivering FX pricing, every 30 seconds • Pricing are sent in real time (to near real time) to Kinesis Data Firehose or Streams • Each pricing in JSON is in below format Market Data Application Amazon S3 bucket for raw data Amazon Kinesis Data Firehose { "ask": 212.2553, "timestamp": 1515484223, "symbol": "XAGZAR", "bid": 211.6336, "price": 211.9445 }
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Compute Pricing Metrics in Near Real-Time Compute metrics using SQL in real time like: • Max, Min and Average price for the past hour • Previous Price and Price Change Amazon Kinesis Data Analytics Raw data Real time analytics { "min": 212.2553, "timestamp": 1515484223, "symbol": "XAGZAR", "max": 211.6336, "average": 211.9445 "change": 1.1954 "previous_price ": 210.7491 "price ": 211.9445 }
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How Do I Write Streaming SQL? Easy! Streams (in memory tables) CREATE OR REPLACE STREAM DESTINATION_SQL_STREAM( "@timestamp" BIGINT, symbol VARCHAR(8), min_price DOUBLE, max_price DOUBLE, avg_price DOUBLE, previous_price DOUBLE, new_price DOUBLE change DOUBLE );
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How Do I Write Streaming SQL? Easy! Pumps (continuous query) CREATE OR REPLACE PUMP "STREAM_PUMP" AS INSERT INTO "DESTINATION_SQL_STREAM" SELECT STREAM "COL_timestamp” * 1000, "ticker_symbol", MIN("price") OVER W1 as min_price, MAX("price") OVER W1 as max_price, AVG("price") OVER W1 as avg_price, FIRST_VALUE("price")OVER R1 as previous_price, "price" as new_price, "price" – FIRST_VALUE("price") OVER R1 as CHANGE FROM "SOURCE_SQL_STREAM_001” WINDOW W1 AS (PARTITION BY "ticker_symbol" RANGE INTERVAL '1' HOUR PRECEDING), R1 AS (PARTITION BY "ticker_symbol" ROWS 1 PRECEDING)
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How Do We Aggregate Streaming Data? • Aggregations (count, sum, min,…) take granular real time data and turn it into insights • Data is continuously processed so you need to tell the application when you want results Windows!
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Window Types • Sliding, tumbling, and custom windows • Tumbling windows are fixed size and grouped keys do not overlap
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Real-Time Notification & Dashboard • Use Kinesis Data Firehose to archive processed data in S3 • Use AWS Lambda to generate notification • Open source or other tools to visualize the data Real time analytics AWS ElasticSearch Amazon S3 bucket for processed data Amazon Kinesis Data Firehose AWS Lambda function Amazon SNS Notification
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Where To Go Next?
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Getting Started • Kinesis Home Page: https://aws.amazon.com/kinesis/ • Kinesis Blog Post: https://aws.amazon.com/kinesis/blog-posts/ • Getting Started Page: https://aws.amazon.com/kinesis/getting-started/
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. THANK YOU!