A developer is implementing a retail order processing pipeline. A producer application writes order updates to an Amazon Kinesis data stream using the customer's country code as the partition key. An AWS Lambda function, configured within a private VPC subnet without internet access, processes the stream and must route orders exceeding USD to an external system via an Amazon EventBridge custom event bus.
During high-traffic events, the developer observes two issues:
1. The Kinesis stream experiences `ProvisionedThroughputExceededException` errors on a single shard, even though overall stream throughput is well below the stream limits.
2. The Lambda function times out and fails to publish the filtered high-value events to the EventBridge event bus.
Which combination of actions will resolve both issues?
- Change the Kinesis producer to use a high-entropy value such as the unique order ID as the partition key, and create an interface VPC endpoint (AWS PrivateLink) for EventBridge in the Lambda function's VPC subnets.Answer
- BIncrease the number of shards in the Kinesis stream to distribute the load, and assign a public IP address to the Lambda function's ENIs to allow it to communicate with EventBridge directly over the internet.
- CUpdate the Kinesis producer to use a static, constant string as the partition key to ensure order preservation, and update the trust policy of the Lambda execution role to allow the EventBridge service to publish events.
- DKeep the country code partition key but increase the Lambda batch size to process more records per invocation, and increase the Lambda function's timeout limit to allow the network calls to EventBridge to complete.