Supplying Partition Keys
The Kinesis target service requires partition keys to put data into the shards within a stream. The target service can generate random partition keys, but you can supply partition keys if you want to use specific strings. The target service scans the message headers for a key-value pair to use as a partition key.
You can supply partition keys in one of the following ways:
- Insert a custom message header to use as a partition key.
- Use the EDS API and create a custom transformation type to insert a key-value pair as a message header. When you configure the Kinesis target service, use the key of the custom header as the partition key. Add the transformation to the connection between the source and the Kinesis target. For more information about creating a custom transformation type, see
The Edge Data Streaming Developer Guide.
- Use the built-in IP address message header as a partition key.
- EDS inserts a message header that stores the IP address of the host on which the source service runs. When you configure the Kinesis target service, specify the IP address as the partition key name.
- Let the Kinesis target service generate partition keys.
- If you use a dynamic partition key, the target service generates and uses a random partition key. The target service generates partition keys that are sufficiently random to ensure that the shards in the Kinesis stream receive an even distribution of data. When you configure the Kinesis target service, choose the random partition key name option.