An application team is designing a real-time fraud detection system for a mobile payments platform. The application publishes transaction details as JSON events to a custom Amazon EventBridge event bus. A developer must create an EventBridge rule that filters transaction events to identify high-value payments exceeding USD and routes them directly to an Amazon Kinesis Data Stream. The solution must ensure that transactions from the same user are processed in the order they occurred, without causing hot shards under normal load, and that the rule has the necessary access to publish to the stream. Which TWO configurations must the developer implement to meet these requirements?
- Configure the EventBridge rule target with the PartitionKeyPath parameter set to $.detail.userId to route events for the same user to the same Kinesis shard.Cevap
- Create an IAM role with a trust policy that allows the events.amazonaws.com service principal to perform sts:AssumeRole, and a permission policy that grants the role kinesis:PutRecord permissions on the Kinesis stream.Cevap
- CConfigure the EventBridge rule target with the PartitionKeyPath parameter set to $.detail.status to group and order all events by their transaction completion status.
- DCreate an IAM role with a permission policy that allows the events.amazonaws.com service principal to perform the sts:AssumeRole action, and a trust policy that allows kinesis:PutRecord on the Kinesis stream.
- ERoute the filtered events from EventBridge to a custom Lambda function deployed in a private VPC subnet with no NAT Gateway or VPC endpoint to forward the records to the Kinesis stream.
Cevap
The developer must configure the EventBridge target with a PartitionKeyPath pointing to the user ID payload attribute, and assign an IAM role whose trust policy permits the EventBridge service principal to assume it and whose permissions policy allows writing to the Kinesis stream.
The correct options implement the appropriate target parameters and cross-service permissions. Specifying the user ID as the PartitionKeyPath ensures ordered delivery per user while avoiding hot shards. Providing an IAM role with a trust policy allowing the EventBridge service principal to assume it and permission policy allowing kinesis:PutRecord allows EventBridge to successfully write the filtered events to the Kinesis stream.
Adım Adım Çözüm
Anahtar Kavram
Routing events from Amazon EventBridge to Amazon Kinesis Data Streams requires specifying a target JSONPath-based partition key for ordering and shard distribution, along with establishing an IAM trust relationship and permission boundary for EventBridge.