An application deployed on AWS Fargate publishes high-throughput security audit logs to an Amazon Kinesis Data Stream. An AWS Lambda function is configured to process the stream records in real-time. The Lambda function is deployed within private subnets of a VPC in order to access an internal Amazon RDS database. However, the Lambda function must also make outbound HTTPS calls to an external third-party security API to validate metadata.
During a high-traffic event, the developer notices two issues:
1. The Lambda function fails to connect to the external API, resulting in connection timeouts.
2. The Kinesis producer on Fargate receives ProvisionedThroughputExceededException errors on specific shards, even though the total stream ingestion rate is well below the overall provisioned limit.
Which two actions should the developer take to resolve these issues? (Select two.)
- Configure a NAT Gateway in a public subnet of the VPC and update the private subnet's route table to route outbound internet traffic through the NAT Gateway.Cevap
- Update the Fargate producer application to use a high-cardinality identifier, such as a combination of UserID and a high-resolution timestamp, as the Kinesis partition key.Cevap
- CIncrease the Lambda function's execution timeout configuration to 25 minutes to allow more time for the connection pool to clear and API calls to complete.
- DModify the Fargate producer application to write all logs using a constant static partition key value to ensure that partition assignment is uniform.
- EAssociate the Lambda function with a public subnet and enable the auto-assign public IP setting in the Lambda configuration to allow direct outbound internet routing.