- Newest
- Most votes
- Most comments
Events in EventBridge can only accept the following fields: Time, Source, Resources, DetailType, Detail, EventBusName, TraceHeader. If you need to pass additional information, such as a partition key, you need to include it inside the Detail field.
If you need to include a Partition key when sending to Kinesis, you will need to use an Input Transformer to create the appropriate structure, and use the key from the Detail fiel.
Thanks Uri,
another option that I found is to include PartitionKey inside Detail,
then in Target Rule add:
\"InputPath\":\"$.detail\" , \"KinesisParameters\":{\"PartitionKeyPath\":\"$.detail.PartitionKey\"}
It looks like the Kinesis Data Stream needs to receive PartitionKey but I can't include PartitionKey in the EventBridge Event. I'm trying this:
aws events put-events --entries '[{"Source": "my.source", "DetailType": "my.detailtype", "Detail": "{\"key\": \"value\"}", "PartitionKey": "my_partition_key", "EventBusName": "myEventBus"}]'
But I get this error: Unknown parameter in Entries[0]: "PartitionKey", must be one of: Time, Source, Resources, DetailType, Detail, EventBusName, TraceHeader
Any clue?
Relevant content
- asked a year ago
- asked 4 months ago
- Accepted Answerasked 9 months ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
This is exactly what I means by using the Input Transformer.