A developer is implementing a real-time tracking pipeline for a logistics platform. A producer application writes delivery location updates to an Amazon Kinesis Data Stream using the delivery region name (e.g., 'us-east-1') as the partition key. A downstream AWS Lambda function is configured to process the stream via an event source mapping and must call an external third-party mapping API to validate coordinates. The Lambda function is deployed within private subnets of a VPC. During peak hours, the developer observes ProvisionedThroughputExceededException errors on the Kinesis stream, despite the total data volume being well below the stream's aggregate limit. Additionally, the Lambda function fails to connect to the external API. Which combination of changes should the developer implement to resolve both the Kinesis throttling and the connection issues?
- AIncrease the Kinesis stream shard count to handle peak load. Move the Lambda function to a public subnet to allow direct access to the internet.
- Update the producer application to use a high-entropy key, such as a unique delivery ID, as the partition key. Configure a NAT Gateway in a public subnet and route internet-bound traffic from the Lambda function's private subnet through it.Cevap
- CUpdate the producer application to use a high-entropy key, such as a unique delivery ID, as the partition key. Configure an AWS PrivateLink VPC endpoint for the external third-party API.
- DKeep the delivery region name as the partition key to preserve ordering, and increase the Kinesis stream shard count. Configure a NAT Gateway in a public subnet and route internet-bound traffic from the Lambda function's private subnet through it.