A developer is building a security auditing system. An application publishes security events to Amazon EventBridge. A specific rule on the EventBridge event bus matches high-priority authorization failure events and routes them to an Amazon Kinesis Data Stream. An AWS Lambda function is configured to process events from the Kinesis Data Stream to detect potential security threats in real-time. During testing, the developer observes two issues:
1. The Kinesis Data Stream is experiencing throughput throttling on a single shard, even though the overall data volume is well below the stream's aggregate limit.
2. The Lambda function, which is deployed in a private VPC subnet to access a database, is failing to call the EventBridge API to publish alerts.
Which two actions should the developer take to resolve these issues?
- Update the producer application to use a high-entropy partition key, such as the unique userId, when publishing events to the Amazon Kinesis Data Stream.Answer
- Create an interface VPC endpoint (AWS PrivateLink) for Amazon EventBridge in the VPC, or route the private subnet traffic through a NAT Gateway in a public subnet.Answer
- CIncrease the shard capacity of the Amazon Kinesis Data Stream and configure the producer to use a static string, such as the application name, as the partition key.
- DModify the Lambda function's IAM execution role trust policy to allow the VPC service principal (vpc.amazonaws.com) to assume the role.
- EIncrease the Lambda function's timeout configuration to allow the EventBridge API client request to complete before the execution context is reused.