Soru

Zorluk: ZorStream Processing and Event Routing with Amazon Kinesis and EventBridge

A developer is designing a telemetry ingestion pipeline for IoT smart meters. The metrics are published to an Amazon Kinesis Data Stream with 4 shards. The producer application currently uses the MeterID as the partition key. Because a subset of the smart meters generates a significantly higher volume of events, the developer observes frequent ProvisionedThroughputExceededException errors on specific shards during peak hours, while other shards remain underutilized. Additionally, a new requirement specifies that critical maintenance alarms embedded in the telemetry payload must be immediately routed to an Amazon EventBridge custom event bus for downstream processing. Which TWO actions should the developer take to resolve the partition throughput issues and route the critical alarms?

  1. Modify the producer application to use a composite key consisting of the MeterID and a high-cardinality attribute (such as a hash of the event timestamp) as the partition key.Cevap
  2. Create an Amazon EventBridge Pipe with the Kinesis Data Stream as the source, define a filter pattern matching the critical maintenance alarms, and set the custom event bus as the target.Cevap
  3. C
    Update the producer application to use a single static string as the partition key for all payloads to guarantee strict global ordering of messages across all shards.
  4. D
    Deploy the backend consumer Lambda function inside a private VPC subnet with no route to a NAT Gateway or VPC endpoint to secure the data transfer.
  5. E
    Adjust the consumer Lambda function configuration by increasing its execution timeout limit to 30 minutes to allow processing of delayed streams during peak volume hours.

Cevap

Modify the producer application to use a composite key consisting of the MeterID and a high-cardinality attribute (such as a hash of the event timestamp) as the partition key, and create an Amazon EventBridge Pipe with the Kinesis Data Stream as the source, defining a filter pattern matching the critical maintenance alarms, with the custom event bus as the target.
The correct options address both the stream ingestion issue and the routing requirement. First, modifying the partition key to be a composite key of the MeterID and a high-cardinality value (such as a timestamp hash) ensures that write requests are evenly distributed across the shards, eliminating hot shards. Second, EventBridge Pipes is designed to poll data sources like Kinesis Data Streams, filter the events using defined patterns, and route them directly to targets such as a custom EventBridge event bus.

Adım Adım Çözüm

1
Analyze the cause of Kinesis Data Stream throttling.
Identify that the current partition key (MeterID) has insufficient cardinality/entropy, causing a disproportionate amount of traffic to be routed to specific shards (hot shards).
This leads to ProvisionedThroughputExceededException errors because individual shard limits are exceeded.
2
Select a strategy to distribute partition keys evenly.
Introduce a composite key (MeterID + timestamp hash) to increase partition key entropy.
The Kinesis MD5 hashing algorithm will distribute these keys uniformly across all available shards.
3
Select the correct integration pattern to route events to EventBridge.
Implement an Amazon EventBridge Pipe with the Kinesis stream as the source and the custom event bus as the target, applying a JSON filter pattern.
EventBridge Pipes provides a native, serverless way to poll Kinesis streams, filter payloads, and route them to downstream targets like an EventBridge event bus.

Anahtar Kavram

Partition key entropy in Kinesis Data Streams and event routing using EventBridge Pipes.
Tahmini Süre:3m 0s
Bu soruyu puanla