This source imports event data into PostHog from an Amazon Kinesis stream. Kinesis Records must be delivered in a JSON schema in order to be imported.
Requirements
Using the Amazon Kinesis Import app requires either PostHog Cloud, or a self-hosted PostHog instance running version 1.30.0 or later.
Not running 1.30.0? Find out how to update your self-hosted PostHog deployment!
Configuration
Kinesis Records must be delivered in a JSON schema.
You need to configure an eventKey
that maps to the event name in PostHog. The eventKey
can refer to a nested key.
You can optionally configure a comma-separated list of additionalPropertyMappings
, that will map Kinesis Record keys to PostHog Event properties. The Kinesis Record keys can be nested keys, while the corresponding PostHog mapped keys cannot be nested.
For example, take the following Kinesis Record
// Kinesis Record{..."properties: {"eventName": "my posthog event","userId": "$userId","foo": "bar"}}
And the following configuration:
eventKey = properties.eventNameadditionalPropertyMappings = properties.userId:distinct_id,properties.foo:foo
Will be parsed as:
// PostHog Event{"event": "my posthog event","properties: {"distinct_id": "$userId","foo": "bar"}}
IAM policy
You need to provide an AccessKeyID and a SecretAccessKey for a AWS IAM user with at least the following Kinesis Action rights:
DescribeStreamGetShardIteratorGetRecords
Parameters
Option | Description |
---|---|
Kinesis Stream Name Type: string Required: True | AWS Kinesis Stream to read from |
Access Key ID Type: string Required: True | Access Key ID of an AWS IAM able to read from a Kinesis Stream |
Secret Access Key Type: string Required: True | Secret Access Key of an AWS IAM able to read from a Kinesis Stream |
AWS Region Type: string Required: True | Kinesis Stream AWS region |
Posthog event key Type: string Required: True | The Kinesis Record key to be mapped to the PostHog event name. Can be nested (e.g. properties.eventName ) |
Additional Kinesis to Posthog property mappings Type: string Required: False | A comma-separated mapping of additional Kinesis Record keys to map to Posthog event properties. Can be nested (e.g. properties.kinesisPropertyKey:posthogPropertyKey ) |
Installation
- Visit the 'Apps' page in your instance of PostHog.
- Search for 'AWS Kinesis' and select the app, press Install.
- Follow the steps to configure the app.
- Watch events roll in to PostHog.
FAQ
Is the source code for this app available?
PostHog is open-source and so are all apps on the platform. The source code for the Amazon Kinesis Import app is available on GitHub.
Where can I find out more?
Check Amazon's Kinesis documentation for more information on using Amazon Kinesis.
Who created this app?
We'd like to thank PostHog team member Emanuele Capparelli for his work creating this app. Thank you, Emanuele!
Who maintains this app?
This app is maintained by the community. If you have issues with the app not functioning as intended, please let us know!
What if I have feedback on this app?
We love feature requests and feedback! Please tell us what you think! to tell us what you think.
What if my question isn't answered above?
We love answering questions. Ask us anything via our community forum, or drop us a message.