Implementing a digital marketing analytics solution with AWS Pinpoint for engagement metrics and Kinesis for real-time data streaming
PythonThe below Pulumi python program provides a solution to create an AWS Pinpoint Event Stream for engagement metrics, and an AWS Kinesis stream for real-time data streaming.
The Pinpoint
EventStream
enables streaming of event data from Pinpoint to Kinesis Data Firehose (aws.pinpoint.EventStream).The Kinesis
Stream
creates and manages Kinesis Data Streams, a fully-managed service for real-time streaming data processing (aws.kinesis.Stream).You may need to replace some property values with your own actual needed values (like IAM role ARN, name, etc):
import pulumi from pulumi_aws import pinpoint, kinesis # Create a Kinesis Stream for Real-time data streaming kinesis_stream = kinesis.Stream("kinesisStream", name="my-kinesis-stream", shard_count=2 # Replace with number of shards you want ) # Create a Pinpoint Event Stream for engagement metrics pinpoint_eventStream = pinpoint.EventStream("pinpointEventStream", application_id="app-id", # Replace with your actual Application Id destination_stream_arn=kinesis_stream.arn, role_arn="role-arn" # Replace with your actual IAM Role ARN ) # Export the names and ARNs of both the Kinesis stream and the Pinpoint Event Stream pulumi.export("kinesisStreamARN", kinesis_stream.arn) pulumi.export("pinpointEventStreamID", pinpoint_eventStream.id)
This Pulumi program will create both AWS Kinesis stream and AWS Pinpoint event stream but it's important to note that you would need to prepare your analytics solution to consume real-time data from AWS Kinesis, and also make sure your setup is correctly sending engagement metrics to AWS Pinpoint.