A developer is configuring a system where web application clickstream events are sent to an Amazon Kinesis Data Stream. The developer also needs to route user purchase events to an Amazon EventBridge custom event bus. Which two configurations should the developer implement to meet these requirements?
- Use a unique session identifier as the partition key when writing records to the Kinesis Data Stream.Answer
- Configure an Amazon EventBridge rule with a JSON-based event pattern to filter and route only the purchase events.Answer
- CUse a constant string such as 'web_logs' as the partition key for all records sent to the Kinesis Data Stream.
- DDeploy the consumer AWS Lambda function in a private VPC subnet with no NAT Gateway or VPC endpoints to process the stream events.
- EUpdate the IAM trust policy of the custom event bus to grant permissions for writing data directly to Amazon DynamoDB.
Answer
Use a unique session identifier as the partition key when writing records to the Kinesis Data Stream, and configure an Amazon EventBridge rule with a JSON-based event pattern to filter and route only the purchase events.
The correct options are to use a unique session identifier as the partition key and to configure an EventBridge rule with a JSON event pattern. A high-entropy partition key ensures records are distributed evenly across shards, while EventBridge filters and routes events based on JSON structure matching.
Step-by-Step Solution
Key Concept
Partition key selection in Amazon Kinesis Data Streams for data distribution, and event routing via JSON pattern matching in Amazon EventBridge.