A development team is deploying a monitoring agent to forward application performance logs from multiple web servers to Amazon Kinesis Data Streams. The logs must be partitioned so that all logs from a specific web server are ordered sequentially within a single shard. Additionally, logs containing critical errors must be routed to an Amazon EventBridge event bus to trigger automated recovery tasks.
Which of the following configurations should the developer implement? (Select TWO.)
- Use a unique identifier for each web server, such as the server host name, as the partition key when publishing log records to the Kinesis Data Stream.Answer
- Define an EventBridge routing rule containing a JSON event pattern that matches logs where the severity level is equal to critical error.Answer
- CUse a single, constant string value as the partition key for all log records to ensure they are processed by a single consumer group.
- DSet the execution timeout of the downstream AWS Lambda function that processes the EventBridge events to 3 seconds, assuming that connection pools and execution contexts are automatically cleaned up immediately after each event delivery.
- EDeploy the downstream AWS Lambda consumer in a private VPC subnet without a NAT Gateway or VPC Endpoint to process events and send recovery alerts to an external third-party webhook.
Answer
To achieve ordering per server and filter error events, the developer should use a unique identifier like the server host name as the partition key in Kinesis, and define an EventBridge routing rule with a JSON event pattern matching critical error logs.
The correct configurations involve using a unique server host name as the partition key to ensure message ordering per server within a shard, and setting up an EventBridge rule with a JSON event pattern matching critical error severity to filter events.
Step-by-Step Solution
Key Concept
Partitioning in Kinesis Data Streams for ordering and event filtering in EventBridge.