Question

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

A developer is building a telemetry ingestion pipeline where an Amazon EventBridge rule routes custom device events to an Amazon Kinesis Data Stream target. The event payloads contain a nested JSON structure like the following:

{
"version": "2026-07-15",
"detail-type": "DeviceTelemetry",
"source": "my.company.iot",
"detail": {
"device_id": "dev-98765",
"region": "us-west-2",
"metrics": {
"temperature": 42.5
}
}
}

During load testing, the developer observes two issues:
1. All events are being routed to a single shard in the Kinesis stream, causing write throttling (`ProvisionedThroughputExceededException`).
2. Some events are dropped entirely with delivery failures, and the EventBridge target invocation logs show access denied errors.

Which combination of configuration changes will resolve both the write throttling and the event delivery failures?

  1. A
    Configure the EventBridge rule target with a Partition Key Path of `$.detail-type`. Attach an IAM role to the EventBridge rule that has a trust policy allowing the `events.amazonaws.com` service principal to assume the role, and an identity-based policy allowing the `kinesis:PutRecord` action on the target stream.
  2. B
    Route the EventBridge rule to an intermediate AWS Lambda function deployed in a private VPC subnet without a NAT Gateway or VPC endpoint to write the events to Kinesis. Attach an IAM role to the Lambda function with a trust policy allowing the `lambda.amazonaws.com` service principal to assume the role.
  3. Configure the EventBridge rule target with a Partition Key Path of `$.detail.device_id`. Attach an IAM role to the EventBridge rule that has a trust policy allowing the `events.amazonaws.com` service principal to assume the role, and an identity-based policy allowing the `kinesis:PutRecord` action on the target stream.Answer
  4. D
    Configure the EventBridge rule target with a Partition Key Path of `$.detail.device_id`. Attach an IAM role to the EventBridge rule that has a trust policy allowing the `kinesis.amazonaws.com` service principal to assume the role, and an identity-based policy allowing the `kinesis:PutRecord` action on the target stream.

Answer

Configure the EventBridge rule target with a Partition Key Path of `$.detail.device_id`, and attach an IAM role to the EventBridge rule with a trust policy that allows `events.amazonaws.com` to assume the role and an identity-based policy that allows the `kinesis:PutRecord` action.
Extracting the unique `device_id` using the JSONPath `$.detail.device_id` ensures high-entropy partition keys, distributing writes evenly across all shards to prevent throttling. Setting the trust policy to allow `events.amazonaws.com` permits EventBridge to assume the role and execute the `kinesis:PutRecord` action on the target stream.

Step-by-Step Solution

1
Analyze the Kinesis Data Stream throttling issue.
Identify that Kinesis uses partition keys to determine which shard receives a record. A low-entropy partition key (such as a constant or the event type) routes all traffic to a single shard, causing a hot shard and throttling.
To distribute records evenly, we must extract a high-entropy attribute from the payload, such as `device_id`.
2
Configure the Partition Key Path in the EventBridge rule target.
Use JSONPath `$.detail.device_id` to dynamically resolve to the unique device ID of each telemetry event.
This guarantees that events are distributed across all available shards based on the hash of the device ID, resolving the `ProvisionedThroughputExceededException`.
3
Resolve the delivery permission errors.
Attach an IAM role to the EventBridge rule. The trust policy must trust `events.amazonaws.com` (EventBridge service) so that it can assume the role. The role's permissions must allow the `kinesis:PutRecord` action on the target Kinesis Data Stream.
EventBridge needs temporary credentials via AWS STS to write records directly to the Kinesis stream on your behalf.

Key Concept

Configuring EventBridge rule targets for Kinesis Data Streams requires setting high-entropy partition keys using JSONPath and establishing proper IAM cross-service assume role permissions.
Rate this question