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.)
- Use a compound partition key consisting of the smart meter ID and the current timestamp when publishing records to the Kinesis Data Stream.Cevap
- 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.Cevap
- CUse the postal code of the smart meter installation location as the partition key when publishing records to the Kinesis Data Stream.
- DAttach an IAM trust policy to the Lambda execution role that allows the events.amazonaws.com service principal to assume the role.
- EDeploy the consumer Lambda function inside a private VPC subnet without a NAT Gateway or VPC endpoints configured.
Cevap
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.
Adım Adım Çözüm
Anahtar Kavram
Even distribution of data in Kinesis streams using high-entropy partition keys, and standard IAM authorization for EventBridge ingestion.