What should the company do next to meet these requirements?
Create an Amazon CloudWatch alarm that uses the ConsumedReadCapacityUnits metric. Set the alarm threshold to a value that is close to the DynamoDB table’s provisioned capacity. Configure the alarm to publish notifications to the SNS topic.
Turn on auto scaling on the DynamoDB table. Configure an Amazon EventBridge rule to publish notifications to the SNS topic during scaling events.
Turn on Amazon CloudWatch Logs for the DynamoDB table. Create an Amazon CloudWatch metric filter to pattern match the THROTTLING_EXCEPTION status code from DynamoDB. Create a CloudWatch alarm for the metric. Select the SNS topic for notifications.
Configure the application to store logs in Amazon CloudWatch Logs. Create an Amazon CloudWatch metric filter to pattern match the THROTTLING_EXCEPTION status code from DynamoDB. Create a CloudWatch alarm for the metric. Select the SNS topic for notifications.
Explanations:
Creating a CloudWatch alarm based on the ConsumedReadCapacityUnits metric allows the company to monitor when the read capacity approaches the provisioned limit. Setting an appropriate threshold will ensure that the operations team is alerted before throttling occurs. This is a proactive solution to meet the requirements.
Turning on auto scaling helps adjust the provisioned capacity automatically based on demand. However, using an EventBridge rule for scaling events won’t give an early warning about imminent throttling before the table reaches capacity limits. It only reacts to scaling, not to the risk of throttling.
Enabling CloudWatch Logs for DynamoDB is unnecessary for this use case. CloudWatch Logs provide detailed log data but do not directly monitor read capacity. Pattern matching forTHROTTLING_EXCEPTIONwould require logs to be specifically set up, and even then, this would not proactively alert based on capacity utilization.
The application would need to generate logs that capture theTHROTTLING_EXCEPTIONstatus code, but this solution is not the most efficient or direct way to monitor the read capacity for impending throttling. Instead, CloudWatch metrics for DynamoDB’s consumed capacity are better suited to detecting capacity issues before they lead to throttling.