# AWS Kinesis

### **What is Kinesis Data Streams**

* Kinesis Data Streams is a real-time data streaming service by AWS.
* Think of it as a pipeline that continuously collects and moves data so you can process it instantly, rather than waiting for it to be stored in a database.

Why it is used:

* Real-time processing: You can analyze data as it comes in, like live website clicks, IoT sensor data, or financial transactions.
* Scalable: It can handle large volumes of data from multiple sources.
* Flexible consumption: Multiple applications can read the same stream to perform different tasks (analytics, monitoring, alerting).

Example in simple terms:\
Imagine a shop with hundreds of cash registers. Each register sends sales data continuously to a system. Kinesis Data Streams acts like the conveyor belt carrying all that data to different processing stations — one for inventory updates, one for sales analysis, one for fraud detection — all in real time

<figure><img src="https://1856860631-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsNc001Xcz63mWjGXymkd%2Fuploads%2FlYMkG3GauhXpiPdhCNmG%2Fimage.png?alt=media&#x26;token=98f9271f-fe55-4d13-93dd-f5dced4eea9a" alt=""><figcaption></figcaption></figure>

### **Kinesis Data Firehose**

What it is:

* Kinesis Data Firehose is a fully managed service that loads streaming data into destinations like S3, Redshift, Elasticsearch, or Snowflake.
* Unlike Kinesis Data Streams, you don’t have to build applications to process the data — Firehose handles it automatically.

Why it is used:

* Automatic delivery: It takes streaming data and sends it to storage or analytics services.
* Simple setup: No need to manage servers or scaling.
* Data transformation: You can optionally transform data (e.g., convert formats or compress) before storing it.
* Near real-time: Data is delivered almost immediately after it arrives.

Example in simple terms:\
Imagine the same shop with hundreds of cash registers. Each register sends sales data continuously. Firehose acts like a smart conveyor belt that collects all that data, optionally cleans or converts it, and delivers it straight to a data warehouse or storage for reporting, without you writing any code.

💡 Key difference from Data Streams:

* Data Streams: You manage processing and consumption, real-time analytics.
* Data Firehose: AWS handles processing and delivery, easier to use, mostly for storage and analytics.

<figure><img src="https://1856860631-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsNc001Xcz63mWjGXymkd%2Fuploads%2F82V6nzjDHvLekgpWkbvr%2Fimage.png?alt=media&#x26;token=0702e384-7134-40aa-b13e-a05484f2d005" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1856860631-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsNc001Xcz63mWjGXymkd%2Fuploads%2FbGthXub3c1UigMfpkkty%2Fimage.png?alt=media&#x26;token=b6823679-dfcb-4c3d-aa95-fcab366d943c" alt=""><figcaption></figcaption></figure>

### **Kinesis Data Analytics**

What it is:

* Kinesis Data Analytics is a service that lets you analyze streaming data in real time using SQL or Java.
* It works on top of Kinesis Data Streams or Firehose, so you don’t have to store the data first to analyze it.

Why it is used:

* Real-time insights: You can detect patterns, trends, or anomalies immediately.
* SQL-friendly: You can write SQL queries on streaming data just like you would in a database.
* Integration: Results can be sent to S3, Redshift, Elasticsearch, or even back to another Kinesis stream.

Example in simple terms:\
Imagine our shop with hundreds of cash registers sending sales data:

* With Kinesis Data Analytics, you could calculate total sales per minute, detect sudden spikes in purchases, or track popular items in real time, all as the data is streaming in, without waiting for a batch report.

💡 In short:

* Data Streams: Collects raw data.
* Data Firehose: Delivers data to storage/analytics.
* Data Analytics: Analyzes streaming data in real time

<figure><img src="https://1856860631-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsNc001Xcz63mWjGXymkd%2Fuploads%2F6CIJrbpRZJDwud9oqdde%2Fimage.png?alt=media&#x26;token=be05cb8c-042c-4dd9-9633-c2209d7507b4" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1856860631-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsNc001Xcz63mWjGXymkd%2Fuploads%2FyrOSEtzGDM3AZeMAeBNa%2Fimage.png?alt=media&#x26;token=b310b5d2-f95b-4b0b-8c0c-5e05fe9891a3" alt=""><figcaption></figcaption></figure>

### **Kinesis Video Streams**

What it is:

* Kinesis Video Streams is a service that ingests, stores, and processes video and audio streams in real time.
* It can handle live video from cameras, IoT devices, or mobile devices.

Why it is used:

* Real-time video processing: Analyze video on the fly for object detection, facial recognition, or monitoring.
* Storage & playback: Automatically stores video in a secure, durable way so you can replay it later.
* Integration with AI/ML: Can connect to services like Amazon Rekognition for real-time video analytics.

Example in simple terms:\
Imagine a security camera system in a building:

* The camera sends live video to Kinesis Video Streams.
* You can analyze the video in real time to detect intruders, track movement, or alert security staff immediately.
* All video is also stored safely for later review.

<figure><img src="https://1856860631-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsNc001Xcz63mWjGXymkd%2Fuploads%2FzGqCRqHuSgrB1EM7EFKT%2Fimage.png?alt=media&#x26;token=adf767ce-2e2a-4537-8a1c-efada741664d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1856860631-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsNc001Xcz63mWjGXymkd%2Fuploads%2FVw3sm7JbnM2quqrbHWiX%2Fimage.png?alt=media&#x26;token=b3536ece-5cd0-4ed8-a549-79feb517b813" alt=""><figcaption></figcaption></figure>

**💡 In short:**

* **Data Streams: For text/numeric data.**
* **Data Firehose: For delivery/storage of streaming data.**
* **Data Analytics: For analyzing streaming data in real time.**
* **Video Streams: For streaming, storing, and analyzing video/audio data in real time.**
