Lesson 4 of 5 Data Lake and Analytics Architectures

Building Real-Time and Batch Analytics Pipelines

This lesson explains the AWS services for real-time and batch analytics pipelines and how to choose between them.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish Amazon MSK and Kinesis Data Streams for streaming pipelines.
  • Describe how EMR, Redshift and AppFlow fit into batch pipelines.
  • Choose services for a pipeline from existing tooling, scale and cost.

Real-time pipelines

Amazon MSK runs Apache Kafka as a managed service, provisioned or serverless, so existing producers, consumers and topics move with configuration changes, and MSK Connect runs Kafka Connect connectors. Kinesis Data Streams is the AWS-native alternative with on-demand capacity. Stream processing runs in Amazon Managed Service for Apache Flink, Lambda or Spark Structured Streaming on EMR or Glue, and results land in S3, OpenSearch Service or Redshift, which can ingest directly from Kinesis or MSK with streaming ingestion.

Batch pipelines

Amazon EMR runs Spark, Hive, Presto and other frameworks on EC2 clusters, on EKS or as EMR Serverless. Using S3 as storage and Spot Instances for task nodes keeps large jobs cost-effective, and the Glue Data Catalog serves as the metastore. Amazon Redshift, provisioned or Serverless, is the warehouse for structured, high-concurrency SQL; zero-ETL integrations replicate data from Aurora and DynamoDB without pipelines. Amazon AppFlow moves data from SaaS applications such as Salesforce, SAP and ServiceNow to S3 or Redshift on a schedule, on events or on demand, with field mapping, filtering and private connectivity.

Choosing services

Amazon MSK
RoleKafka streaming
Choose whenExisting Kafka clients and connectors
Cost leversServerless or right-sized brokers
Kinesis Data Streams
RoleAWS-native streaming
Choose whenNew AWS-native streaming with minimal operations
Cost leversOn-demand or provisioned shards
Amazon EMR
RoleLarge-scale batch and streaming processing
Choose whenSpark or Hadoop workloads at scale
Cost leversSpot task nodes, EMR Serverless
Amazon AppFlow
RoleSaaS data ingestion
Choose whenSalesforce, SAP or other SaaS sources
Cost leversScheduled, filtered flows
Match the pairs

Pipeline services

Exam skills 1.5.2

Match each pipeline need with the service that fits it.

Log in to try this activity Interactive activities are free with an account.
Worked example

Unifying sales data

A manufacturer runs Kafka on premises for factory events, keeps sales opportunities in Salesforce and runs nightly Spark jobs on an ageing Hadoop cluster.

Factory events move to MSK with MirrorMaker 2 replicating topics during migration, and Flink computes real-time production metrics into OpenSearch dashboards.

AppFlow loads Salesforce opportunities to S3 every hour without code, and the Spark jobs move to EMR Serverless reading S3, so the company stops paying for an idle cluster between nightly runs. Redshift Serverless serves the sales dashboards.

Check yourself

When is Amazon MSK a better choice than Kinesis Data Streams?

Show answer

When the company already has Kafka producers, consumers and connectors, because MSK runs Kafka itself and they move with configuration changes rather than rewrites.

Exam Tips

Remember for the exam

  • Existing Kafka applications with least change: Amazon MSK (MSK Connect for connectors).
  • Large Spark jobs at lowest cost: EMR with Spot task nodes or EMR Serverless.
  • SaaS data into S3 without custom code: Amazon AppFlow.
  • Replicate operational data to Redshift without pipelines: zero-ETL integrations.