Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. DynamoDB monitoring refers to the process of monitoring the performance and usage of a DynamoDB database. This includes tracking metrics such as read and write throughput, response time, and error rates, as well as monitoring the usage of resources such as storage space and data transfer.
Monitoring can be done through Amazon CloudWatch, the AWS Management Console, and third-party monitoring tools. The goal of DynamoDB monitoring is to ensure the database is running efficiently and effectively, and to identify and resolve any issues that may arise.
This is part of a series of articles about serverless debugging
In this article
Amazon CloudWatch is a monitoring service provided by Amazon that allows you to monitor various metrics for various AWS resources, including DynamoDB. CloudWatch provides the following monitoring features for DynamoDB:
To create CloudWatch alarms to monitor capacity in DynamoDB:
To create an alarm for system errors in DynamoDB, follow the same steps as above, but select the ThrottledRequests metric and set the threshold at a value of 1 or more. This will trigger the alarm whenever there is a system error in DynamoDB.
The UserErrors metric in CloudWatch measures the number of user errors that occurred when interacting with a DynamoDB table. A user error is an error that occurs due to a mistake made by the user, such as attempting to read an item that does not exist in the table. Monitoring this metric can be useful for identifying and troubleshooting issues with user interactions with the DynamoDB table.
The SystemErrors metric in CloudWatch measures the number of system errors that occurred when interacting with a DynamoDB table. A system error is an error that is not caused by a mistake made by the user, but rather by an issue with the DynamoDB service itself. Monitoring this metric can be useful for identifying and troubleshooting issues with the DynamoDB service.
The ConsumedReadCapacityUnits metric in CloudWatch measures the number of read capacity units that have been consumed when interacting with a DynamoDB table. Read capacity units are a measure of the number of reads per second that a DynamoDB table can handle.
The ConsumedWriteCapacityUnits metric in CloudWatch measures the number of write capacity units that have been consumed when interacting with a DynamoDB table. Write capacity units are a measure of the number of writes per second that a DynamoDB table can handle.
Monitoring these metrics can be useful for understanding the performance and usage of a DynamoDB table and for identifying potential issues with read and write capacity.
The ThrottledRequests metric in CloudWatch measures the number of requests to a DynamoDB table that were throttled due to exceeding the table’s capacity limits. When a request is throttled, it is not processed and an error is returned to the user.
Monitoring this metric can be useful for identifying when capacity limits are being reached and for determining whether additional capacity is needed to meet demand. It can also be useful for identifying potential issues with the DynamoDB service itself.
Lumigo is a troubleshooting platform purpose-built for microservice-based applications. Developers building serverless apps with services like DynamoDB use Lumigo to monitor, trace and troubleshoot. Deployed with no changes and automated in one-click, Lumigo stitches together every interaction between micro and managed services into end-to-end stack traces, giving complete visibility into serverless environments. Using Lumigo to monitor and troubleshoot their applications, developers get:
To learn more about monitoring and troubleshooting DynamoDB, read our blog Monitoring AWS DynamoDB performance and latency.