Question

Difficulty: HardStream Processing and Event Routing with Amazon Kinesis and EventBridge

An enterprise e-commerce platform publishes high-volume checkout transaction events to a custom Amazon EventBridge event bus. A developer needs to route a subset of these events (specifically where the payment status is 'approved' and transaction amount exceeds $10,000\$10,000) to an Amazon Kinesis Data Stream containing 1010 shards for real-time analytics. An AWS Lambda function is configured to process these records from the Kinesis stream. The developer must ensure that events from the same customer are processed sequentially in the correct order, and that EventBridge has the necessary permissions to write to the Kinesis stream.

Which combination of configuration steps should the developer perform to meet these requirements? (Select two.)

  1. Configure the Kinesis Data Stream as the target for the EventBridge rule, and set the PartitionKeyPath to `$.detail.customerId` in the target configuration settings.Answer
  2. Configure the EventBridge rule's execution IAM role with a trust policy that allows the `events.amazonaws.com` service principal to assume the role, and an identity-based policy that grants `kinesis:PutRecord` or `kinesis:PutRecords` permissions on the target stream.Answer
  3. C
    Configure the EventBridge target with a static string partition key constant, such as `'HighValueTransactions'`, to ensure that all forwarded events are grouped and processed together in a single shard.
  4. D
    Configure the EventBridge rule's IAM role with a trust policy that allows the `kinesis.amazonaws.com` service principal to assume the role, granting the target stream permission to pull events from the event bus.
  5. E
    Configure the Kinesis Event Source Mapping for the Lambda function with a batch size of 10,00010,000 and set the Lambda function's timeout to 33 seconds to maximize record throughput.

Answer

The developer should configure the Kinesis Data Stream as the EventBridge target with the PartitionKeyPath set to the customer ID path, and configure the execution role to trust the EventBridge service principal with permissions to write to the Kinesis stream.
Configuring the target with the `PartitionKeyPath` set to `$.detail.customerId` ensures customer-level ordering. Configuring the EventBridge execution role with a trust policy for `events.amazonaws.com` and permission for `kinesis:PutRecord` or `kinesis:PutRecords` enables the service to deliver events securely.

Step-by-Step Solution

1
Determine the partition key strategy to ensure strict chronological order per customer across Kinesis shards.
Identify that the partition key must resolve dynamically to each customer's ID rather than a static string, using the `PartitionKeyPath` property set to `$.detail.customerId`.
Kinesis routes records to specific shards based on the hash of the partition key. Using the customer ID ensures all records for a given customer are sent to the same shard, maintaining their ordering, while distributed customer IDs balance the overall workload across all 10 shards.
2
Configure the IAM permissions required for EventBridge to publish events directly to Kinesis.
Establish a trust policy allowing `events.amazonaws.com` to assume the role, and attach a policy allowing `kinesis:PutRecord` or `kinesis:PutRecords` on the stream.
EventBridge is the service initiating the action, so it must be trusted to assume the role. The permissions policy must explicitly grant writing capabilities to the specific target stream resource.
3
Analyze the Lambda consumer event source mapping and timeout configuration.
Recognize that a large batch size of 10,00010,000 combined with a very short timeout of 33 seconds is highly likely to cause function timeouts, which would disrupt sequential shard processing.
Processing large batches takes time. If a timeout occurs, the event source mapping retries the batch, blocking downstream processing on that shard and potentially creating duplicates.

Key Concept

Configuring secure EventBridge target delivery to Kinesis with dynamic partitioning to preserve ordering.
Rate this question