Segment
Our real-time data streaming infrastructure is built on-top of the AWS Kinesis Data Streams service, as such we will be connecting Segment to Shaped via the Segment Kinesis Destination.
To begin connecting your Segment account, create a Shaped dataset with schema_type: SEGMENT
, the event schema will be automatically
created based on the Segment event specification. Once in ACTIVE
state, you can access the Kinesis Data Stream name and
IAM Role ARN to configure the Segment Data Destination, found via the Shaped CLI or API.
CLI
shaped view-dataset --dataset-name segment_events
dataset_name: segment_events
dataset_uri: https://api.shaped.ai/v1/datasets/segment_events
schema_type: SEGMENT
dataset_schema: <event_schema>
kinesis_stream_arn: arn:aws:kinesis:us-east-2:11111111111:stream/ShapedDatasetStream-abc123
kinesis_iam_role_arn: arn:aws:iam::11111111111:role/ShapedDatasetAccessRole-abc123
API
curl -X GET "https://api.shaped.ai/v1/datasets/segment_events" \
-H "x-api-key: <API_KEY>"
Configuring Segment
In order to forward events from Segment to Kinesis you will need to perform the following steps:
- In your Segment dashboard source, navigate to 'Add Destination' then find 'Amazon Kinesis'.
- Click 'Edit', then enter the following details:
- AWS Kinesis Stream Name —
"ShapedDatasetStream-*****"
- AWS IAM Role Resource Name (ARN) —
"kinesisIamRoleArn": "arn:aws:iam::*****:role/ShapedDatasetAccessRole-*****"
- AWS Region: us-east-2
- AWS Kinesis Stream Name —
- When finished, enable the destination and save.