A developer is designing an event-driven integration where transaction events from an external order processing service are sent to a custom Amazon EventBridge event bus. The developer creates an EventBridge rule to route these events to an Amazon Kinesis Data Stream for real-time analytics. Each event is a JSON payload that includes `transaction_id`, `store_id`, and `amount`. To support analytics requirements, events must be distributed evenly across the stream's shards, and events with the same `transaction_id` must be processed in the exact order they were received.
Which target configuration should the developer specify in the EventBridge rule to meet these requirements?
- Set the target to the Kinesis Data Stream and configure the Partition Key Path to `$.detail.transaction_id`.Cevap
- BSet the target to the Kinesis Data Stream and configure the Partition Key Path to a static string value such as `"transaction_payload"`.
- CSet the target to the Kinesis Data Stream and configure the trust policy of the EventBridge IAM role to allow the `kinesis.amazonaws.com` service principal to perform `sts:AssumeRole`.
- DSet the target to a downstream AWS Lambda function with its execution timeout set to 3 seconds to process the events directly from the EventBridge rule.
Cevap
Set the target to the Kinesis Data Stream and configure the Partition Key Path to `$.detail.transaction_id`.
The correct configuration is to set the EventBridge rule target to the Kinesis Data Stream and configure the Partition Key Path to use the transaction identifier field. This dynamically extracts the high-entropy transaction ID from the payload, ensuring even shard utilization while maintaining ordered delivery for any single transaction.
Adım Adım Çözüm
Anahtar Kavram
Partitioning in Amazon Kinesis Data Streams via Amazon EventBridge target settings using high-entropy JSON paths.