A developer is designing a real-time transaction processing pipeline. The architecture uses Amazon Kinesis Data Streams to ingest high-volume transaction records from retail merchants, followed by an AWS Lambda function that processes the stream and publishes suspicious transactions to an Amazon EventBridge custom event bus for fraud detection. The Lambda function is deployed inside a private VPC subnet to securely query a database.
During peak sales events, the developer notices two issues:
1. The producer application receives ProvisionedThroughputExceededException errors on the Kinesis stream, even though the total throughput is well below the stream's aggregate limits. The records are currently partitioned using the MerchantID.
2. The Lambda function frequently runs into execution timeouts when attempting to publish events to the EventBridge bus, failing to forward the fraud alerts.
Which two changes should the developer make to resolve these issues?
- Update the producer to use a composite partition key by appending a high-entropy transaction identifier to the MerchantID.Cevap
- Create an interface VPC endpoint (AWS PrivateLink) for EventBridge in the VPC and ensure the Lambda security group allows outbound traffic to it.Cevap
- CUse a static partition key for all incoming transaction records to ensure sequential order of processing across all shards.
- DConfigure a NAT Gateway in the private VPC subnet and update the route table of the same subnet to route 0.0.0.0/0 traffic through it.
- EIncrease the execution timeout of the Lambda function to 15 minutes to handle the increased API response times from EventBridge.