Question

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

An energy utility company is designing a real-time data ingestion system to monitor millions of smart meters. The telemetry data must be ingested into an Amazon Kinesis Data Stream and distributed evenly across all shards to prevent write throttling. Additionally, if the downstream consumer (running on AWS Lambda) detects consumption anomalies, it must route these anomaly events to a custom Amazon EventBridge event bus. Which two actions should the developer take to meet these requirements? (Select TWO.)

  1. Use a compound partition key consisting of the smart meter ID and the current timestamp when publishing records to the Kinesis Data Stream.Answer
  2. Grant the consumer Lambda function IAM permissions for the events:PutEvents action, and configure it to publish anomaly events to the custom EventBridge event bus.Answer
  3. C
    Use the postal code of the smart meter installation location as the partition key when publishing records to the Kinesis Data Stream.
  4. D
    Attach an IAM trust policy to the Lambda execution role that allows the events.amazonaws.com service principal to assume the role.
  5. E
    Deploy the consumer Lambda function inside a private VPC subnet without a NAT Gateway or VPC endpoints configured.

Answer

Use a compound partition key consisting of the smart meter ID and the current timestamp when publishing records to the Kinesis Data Stream, and grant the consumer Lambda function IAM permissions for the events:PutEvents action, and configure it to publish anomaly events to the custom EventBridge event bus.
To ensure uniform shard utilization in Kinesis Data Streams, producers must use a high-entropy partition key. A combination of the smart meter ID and the current timestamp represents a highly unique key that will be hashed uniformly across all available shards. To route downstream anomalies, the consumer Lambda function requires an IAM execution role containing the events:PutEvents permission to successfully publish event JSON payloads to the custom EventBridge event bus.

Step-by-Step Solution

1
Select a high-entropy partition key design for the Kinesis Data Stream producer to ensure even data distribution.
The compound key (smart meter ID + timestamp) ensures data is evenly distributed across all shards, minimizing the risk of hot shards.
This directly prevents ProvisionedThroughputExceededException under heavy load.
2
Ensure the downstream Lambda consumer has proper network access and identity permissions to call EventBridge.
The Lambda function is granted the events:PutEvents action in its IAM execution role and has internet or VPC endpoint access to communicate with EventBridge.
This allows the consumer to publish detected anomalies to the custom event bus without network timeouts or authorization errors.

Key Concept

Even distribution of data in Kinesis streams using high-entropy partition keys, and standard IAM authorization for EventBridge ingestion.
Rate this question