SlideShare a Scribd company logo
1 of 36
Download to read offline
© 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!

More Related Content

What's hot

Introducing AWS DataSync - Simplify, automate, and accelerate online data tra...
Introducing AWS DataSync - Simplify, automate, and accelerate online data tra...Introducing AWS DataSync - Simplify, automate, and accelerate online data tra...
Introducing AWS DataSync - Simplify, automate, and accelerate online data tra...Amazon Web Services
 
Architecting Modern Data Platforms
Architecting Modern Data PlatformsArchitecting Modern Data Platforms
Architecting Modern Data PlatformsAnkit Rathi
 
Module 2 - Datalake
Module 2 - DatalakeModule 2 - Datalake
Module 2 - DatalakeLam Le
 
Build Data Engineering Platforms with Amazon EMR (ANT204) - AWS re:Invent 2018
Build Data Engineering Platforms with Amazon EMR (ANT204) - AWS re:Invent 2018Build Data Engineering Platforms with Amazon EMR (ANT204) - AWS re:Invent 2018
Build Data Engineering Platforms with Amazon EMR (ANT204) - AWS re:Invent 2018Amazon Web Services
 
Best Practices for Building a Data Lake in Amazon S3 and Amazon Glacier, with...
Best Practices for Building a Data Lake in Amazon S3 and Amazon Glacier, with...Best Practices for Building a Data Lake in Amazon S3 and Amazon Glacier, with...
Best Practices for Building a Data Lake in Amazon S3 and Amazon Glacier, with...Amazon Web Services
 
Data Lake Implementation: Processing and Querying Data in Place (STG204-R1) -...
Data Lake Implementation: Processing and Querying Data in Place (STG204-R1) -...Data Lake Implementation: Processing and Querying Data in Place (STG204-R1) -...
Data Lake Implementation: Processing and Querying Data in Place (STG204-R1) -...Amazon Web Services
 
Building a modern data platform in AWS
Building a modern data platform in AWSBuilding a modern data platform in AWS
Building a modern data platform in AWSAmazon Web Services
 
Backing Up Amazon EC2 with Amazon EBS Snapshots (CMP301-R1) - AWS re:Invent 2018
Backing Up Amazon EC2 with Amazon EBS Snapshots (CMP301-R1) - AWS re:Invent 2018Backing Up Amazon EC2 with Amazon EBS Snapshots (CMP301-R1) - AWS re:Invent 2018
Backing Up Amazon EC2 with Amazon EBS Snapshots (CMP301-R1) - AWS re:Invent 2018Amazon Web Services
 
Building a Modern Data Platform in the Cloud
Building a Modern Data Platform in the CloudBuilding a Modern Data Platform in the Cloud
Building a Modern Data Platform in the CloudAmazon Web Services
 
Building responsible AI models in Azure Machine Learning.pptx
Building responsible AI models in Azure Machine Learning.pptxBuilding responsible AI models in Azure Machine Learning.pptx
Building responsible AI models in Azure Machine Learning.pptxLuis775803
 
Simplify and Scale Data Engineering Pipelines with Delta Lake
Simplify and Scale Data Engineering Pipelines with Delta LakeSimplify and Scale Data Engineering Pipelines with Delta Lake
Simplify and Scale Data Engineering Pipelines with Delta LakeDatabricks
 
Realtime Analytics on AWS
Realtime Analytics on AWSRealtime Analytics on AWS
Realtime Analytics on AWSSungmin Kim
 
Automated Machine Learning
Automated Machine LearningAutomated Machine Learning
Automated Machine Learningsafa cimenli
 
Splunk at Airbus
Splunk at AirbusSplunk at Airbus
Splunk at AirbusSplunk
 
LanGCHAIN Framework
LanGCHAIN FrameworkLanGCHAIN Framework
LanGCHAIN FrameworkKeymate.AI
 
Delivering rapid-fire Analytics with Snowflake and Tableau
Delivering rapid-fire Analytics with Snowflake and TableauDelivering rapid-fire Analytics with Snowflake and Tableau
Delivering rapid-fire Analytics with Snowflake and TableauHarald Erb
 
Amazon EC2 Instance Types.pptx
Amazon EC2 Instance Types.pptxAmazon EC2 Instance Types.pptx
Amazon EC2 Instance Types.pptxRomitSingh17
 
Data Migration Using AWS Snowball, Snowball Edge & Snowmobile
Data Migration Using AWS Snowball, Snowball Edge & SnowmobileData Migration Using AWS Snowball, Snowball Edge & Snowmobile
Data Migration Using AWS Snowball, Snowball Edge & SnowmobileAmazon Web Services
 

What's hot (20)

Introducing AWS DataSync - Simplify, automate, and accelerate online data tra...
Introducing AWS DataSync - Simplify, automate, and accelerate online data tra...Introducing AWS DataSync - Simplify, automate, and accelerate online data tra...
Introducing AWS DataSync - Simplify, automate, and accelerate online data tra...
 
Architecting Modern Data Platforms
Architecting Modern Data PlatformsArchitecting Modern Data Platforms
Architecting Modern Data Platforms
 
Module 2 - Datalake
Module 2 - DatalakeModule 2 - Datalake
Module 2 - Datalake
 
AWS Tagging Strategy
AWS Tagging StrategyAWS Tagging Strategy
AWS Tagging Strategy
 
Build Data Engineering Platforms with Amazon EMR (ANT204) - AWS re:Invent 2018
Build Data Engineering Platforms with Amazon EMR (ANT204) - AWS re:Invent 2018Build Data Engineering Platforms with Amazon EMR (ANT204) - AWS re:Invent 2018
Build Data Engineering Platforms with Amazon EMR (ANT204) - AWS re:Invent 2018
 
Best Practices for Building a Data Lake in Amazon S3 and Amazon Glacier, with...
Best Practices for Building a Data Lake in Amazon S3 and Amazon Glacier, with...Best Practices for Building a Data Lake in Amazon S3 and Amazon Glacier, with...
Best Practices for Building a Data Lake in Amazon S3 and Amazon Glacier, with...
 
Data Lake Implementation: Processing and Querying Data in Place (STG204-R1) -...
Data Lake Implementation: Processing and Querying Data in Place (STG204-R1) -...Data Lake Implementation: Processing and Querying Data in Place (STG204-R1) -...
Data Lake Implementation: Processing and Querying Data in Place (STG204-R1) -...
 
Building a modern data platform in AWS
Building a modern data platform in AWSBuilding a modern data platform in AWS
Building a modern data platform in AWS
 
Backing Up Amazon EC2 with Amazon EBS Snapshots (CMP301-R1) - AWS re:Invent 2018
Backing Up Amazon EC2 with Amazon EBS Snapshots (CMP301-R1) - AWS re:Invent 2018Backing Up Amazon EC2 with Amazon EBS Snapshots (CMP301-R1) - AWS re:Invent 2018
Backing Up Amazon EC2 with Amazon EBS Snapshots (CMP301-R1) - AWS re:Invent 2018
 
Building a Modern Data Platform in the Cloud
Building a Modern Data Platform in the CloudBuilding a Modern Data Platform in the Cloud
Building a Modern Data Platform in the Cloud
 
Machine Learning on AWS
Machine Learning on AWSMachine Learning on AWS
Machine Learning on AWS
 
Building responsible AI models in Azure Machine Learning.pptx
Building responsible AI models in Azure Machine Learning.pptxBuilding responsible AI models in Azure Machine Learning.pptx
Building responsible AI models in Azure Machine Learning.pptx
 
Simplify and Scale Data Engineering Pipelines with Delta Lake
Simplify and Scale Data Engineering Pipelines with Delta LakeSimplify and Scale Data Engineering Pipelines with Delta Lake
Simplify and Scale Data Engineering Pipelines with Delta Lake
 
Realtime Analytics on AWS
Realtime Analytics on AWSRealtime Analytics on AWS
Realtime Analytics on AWS
 
Automated Machine Learning
Automated Machine LearningAutomated Machine Learning
Automated Machine Learning
 
Splunk at Airbus
Splunk at AirbusSplunk at Airbus
Splunk at Airbus
 
LanGCHAIN Framework
LanGCHAIN FrameworkLanGCHAIN Framework
LanGCHAIN Framework
 
Delivering rapid-fire Analytics with Snowflake and Tableau
Delivering rapid-fire Analytics with Snowflake and TableauDelivering rapid-fire Analytics with Snowflake and Tableau
Delivering rapid-fire Analytics with Snowflake and Tableau
 
Amazon EC2 Instance Types.pptx
Amazon EC2 Instance Types.pptxAmazon EC2 Instance Types.pptx
Amazon EC2 Instance Types.pptx
 
Data Migration Using AWS Snowball, Snowball Edge & Snowmobile
Data Migration Using AWS Snowball, Snowball Edge & SnowmobileData Migration Using AWS Snowball, Snowball Edge & Snowmobile
Data Migration Using AWS Snowball, Snowball Edge & Snowmobile
 

Similar to 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
 

Similar to 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
 

More from 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
 

More from 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!