Monitoring DynamoDB with CloudWatch

DynamoDB and Cloudwatch monitoring: Amazon Web Services recently introduced a feature to integrate its DynamoDB and CloudWatch components. This feature will allow you to collect and analyze performance metrics. In this post, we’ll cover everything you need to know to get started using them for monitoring AWS resources.

A Brief Overview of DynamoDB and CloudWatch monitoring

Amazon DynamoDB is an entirely managed NoSQL database that allows you to store and retrieve any quantity of data and any level of traffic. With DynamoDB, you can create tables that are easily scaled up or down with no loss in performance. It includes the following features:

  • Scalability. Its seamless scalability can reduce the burden of operating and scaling a distributed database.
  • Hardware provisioning. DynamoDB includes all of the setup tasks, as well as those for configuration, cluster scaling, replication, and software patching that can help offload some administrative tasks.
  • Data. DynamoDB makes it easy to store a large amount of data by creating database tables; retrieval of stored data is also easy.
  • Traffic. It can handle a high level of traffic. You can scale up or scale down the tables created in the database without degrading database performance.

Amazon CloudWatch monitoring is developed to manage and monitor Amazon Web Services (AWS) resources.

CloudWatch allows you to collect and track AWS metrics. To do so, you can define the rules and set threshold values for your metrics. You can create alarms in CloudWatch to be notified of when thresholds have been reached (we’ll show you how later in this post).  CloudWatch gathers information about application performance, resource utilization, and its operational health.

How to View CloudWatch Data for a Table in DynamoDB from the AWS Management Console

Used together, CloudWatch monitoring takes the data from DynamoDB and processes it into readable metrics.  Follow these steps to retrieve CloudWatch data for a table created in DynamoDB from the AWS management console:

  • Sign in at the Amazon Web Service Management console. Then, open the CloudWatch console at http://console.aws.amazon.com/cloudwatch/
  • Click on ‘Metrics’ in the navigation window.
  • Under ‘DynamoDB Metrics’ go to the ‘CloudWatch Metric by Category’ window.’ Select ‘Table Metric’. Now you can explore the complete list of metrics for your table by scrolling down.

All of the available DynamoDB metric options will appear in the ‘viewing list.’ You can use the checkbox beside the resource names and the metrics to select or deselect any metric in the results window. The graphs that show selected metrics are displayed at the bottom of the console.

How to View CloudWatch Data for a Table in DynamoDB from the Command Line Interface 

You can also get results from the table in DynamoDB through the Command Line Interface:

  • Install the AWS Command Line Interface (AWS CLI) by following the instructions on the AWS CLI user guide.
  • Fetch the information through AWS CLI. The parameters that are relevant to DynamoDB are discussed in the DynamoDB Metrics section below.

How to Set Up CloudWatch Monitoring and Alarms
CloudWatch alarms provide real-time notification of events in your AWS resources. You will need to use the DynamoDB console to set these alarms. Then, follow these steps:

  • Select the Alarm tab on the CloudWatch monitoring dashboard.
  • Click on ‘Create Alarm’ to set a new alarm. This alarm will notify you when predefined threshold values have been reached.

Once the alarm has been created, you can add the trigger condition in the ‘whenever’ text box. To set limits, you can use the next text box which concerns the average per second. You can also set a specific time period for the alarm.

DynamoDB Metrics

DynamoDB refers metrics to CloudWatch only when they have a non-zero value. For example, when a request generates an HTTP 400 status code, the UserErrors metric will be generated. If there is no HTTP 400 status during a specific period, no metric will be provided for UserErrors. Also, Amazon CloudWatch has different time intervals for DynamoDB metrics. Some metrics have a one-minute interval whereas all others have an interval of five minutes. The following metrics are available from Amazon DynamoDB:

  1. ConditionalCheckFailedRequest

There must be a logical condition to be evaluated before proceeding with any operation. If this condition results, false value ConditionalCheckFailedRequest is incremented by one.

  1. ConsumedReadCapacityUnits

You can get total read capacity consumed for a table and its global secondary index.

  1. ConsumedWriteCapacityUnits

Provides write capacity units consumed within a period of time. You can track throughput as a provision.

  1. OnlineIndexConsumedWriteCapacity

Provides the number of write capacity units that are consumed while inserting a new global secondary index in a table.

  1. OnlineIndexPercentageProgress

This metric gives a percentage of completion of a new global secondary index in a table.

  1. OnlineIndexThrottleEvents

Provides a count of write throttle events recorded when the new global secondary index is added in a table.

  1. ProvisionedReadCapacityUnits

This metric gives a count of provision read capacity for a global secondary index or table.

  1. ProvisionedWriteCapacityUnits

This metrics provides a count of provision write functions for a global secondary index or table.

  1. ReadThrottleEvents

This metric increases ReadThrottleEvents by one if the requested invent is throttled.

  1. ReturnedBytes

This metric returns a count of bytes from GetRecords operations during the specified period.

  1. ReturnedItemCount

Returns the count of items from Query or scans operations during a specific period.

  1. ReturnedRecordsCount

This metric provides stream records return by GetRecords operations during the specific period.

  1. SuccessfulRequestLatency

This provides the time elapsed for successful requests and a count of successful requests.

  1. SystemErrors

This metric request to DynamoDB generates an HTTP 500 status code during a specific period.

  1. ThrottleRequests

If any event of a request crosses the throughput limit as provisioned in advance, the ThorttleRequests metric is increased by one.

  1. UserErrors

The UserErrors metric request to DynamoDB generates an HTTP 400 status code during a specific period.

  1. WriteThrottleEvents

This metric makes a request to DynamoDB when write capacity units for a table or a global secondary index exceed the provisioned write capacity.

Summary

Successful monitoring requires solid metrics. With the integration of these two technologies, you can use CloudWatch to conveniently monitor tables created in DynamoDB.

DynamoDB tables are distributed among many partitions. To get the best results, you need to design the best tables and applications so that the operations of reading and writing will be spread evenly across DynamoDB tables. You must avoid factors like I/O hotspots as they can degrade performance. All of the items of DynamoDB are limited regarding their size, but you can add limitless items in a table.

CloudWatch monitors AWS products for their essential functions, or it can also monitor them in detail. For basic monitoring, CloudWatch sends data points in five-minute intervals, and for detailed monitoring, you can see data points every minute. You will get most of this integration by applying a thorough understanding of all of the DynamoDB metrics explained above.

If you’re interested to learn more about Amazon CloudWatch, the Cloud Academy’s Getting Started to CloudWatch Course is your go-to course. Watch this short video taken from the course.

Avatar

Written by

Sudhi Seshachala

Sudhi is part of Cloud Technology Partners & is a trusted advisor and strategic consultant to many C level executives and IT Directors. He brings 18+ years diverse experience covering software, IT operations, cloud technologies, and management. Have led several global teams in HP, Sun/Oracle, SeeBeyond and few startups to deliver scalable and highly available business/technology products and solutions. He has expertise in systems management, monitoring and integrated SaaS and on-premise applications addressing a wide range of business problems.


Related Posts

Vijayakumar Athithan
Vijayakumar Athithan
— March 27, 2020

What is Cognito in AWS?

Web applications usually allow a valid username and password combination for successful sign in to the application. Modern authentication flows incorporate more approaches to ensure user authentication. When using AWS, this is no exception, thanks to the abilities and features offered b...

Read more
  • AWS
  • AWS Cognito
  • Solutions Architect
Connie Benton
Connie Benton
— March 25, 2020

How To Build a Career with AWS Certifications

From Iaas and PaaS solutions to digital marketing, cloud computing reshapes the world of technology. As the influence of this technology grows, so does investment. Tens of billions of dollars are being spent on cloud computing-related services each year. This influx is continuing to inc...

Read more
  • AWS
  • Certifications
Avatar
Andrew Larkin
— March 20, 2020

The 12 AWS Certifications: Which is Right for You and Your Team?

As companies increasingly shift workloads to the public cloud, cloud computing has moved from a nice-to-have to a core competency in the enterprise. This shift requires a new set of skills to design, deploy, and manage applications in cloud computing. As the market leader and most ma...

Read more
  • AWS
  • AWS Certifications
Alisha Reyes
Alisha Reyes
— March 17, 2020

Cloud Academy’s Blog Digest: How Do AWS Certifications Increase Your Employability, How to Become a Microsoft Certified Azure Data Engineer, and more

With everything going on right now, it's likely that the only thing you've been reading lately is related to the coronavirus pandemic. It's important to stay informed during these times, but it's also good to jump into something that can take your mind off of the current situation for j...

Read more
  • AWS
  • Azure
  • blog digest
  • Certifications
  • Cloud Academy
  • programming
  • Security
Avatar
Cloud Academy Team
— March 13, 2020

Which Certifications Should I Get?

As we mentioned in an earlier post, the old AWS slogan, “Cloud is the new normal” is indeed a reality today. Really, cloud has been the new normal for a while now and getting credentials has become an increasingly effective way to quickly showcase your abilities to recruiters and compan...

Read more
  • AWS
  • Azure
  • Certifications
  • Cloud Computing
  • Google Cloud Platform
Alisha Reyes
Alisha Reyes
— March 7, 2020

New on Cloud Academy: Intro to GitOps; AWS Courses; Java, Python, Amazon Linux 2, Ubuntu, & Docker Playgrounds; and much more

New Lab Playgrounds This month, our Content Team released six new "playground labs." Our playground labs provide a safe and secure sandbox environment for you to explore your own ideas, follow along with Cloud Academy courses, or answer your own questions — all without having to instal...

Read more
  • AWS
  • Azure
  • gitops
  • Google Cloud Platform
  • lab playground
  • programming
Alisha Reyes
Alisha Reyes
— March 6, 2020

New on Cloud Academy: Intro to GitOps; AWS Courses; Java, Python, Amazon Linux 2, Ubuntu, & Docker Playgrounds; and much more

New Lab Playgrounds This month, our Content Team released six new "playground labs." Our playground labs provide a safe and secure sandbox environment for you to explore your own ideas, follow along with Cloud Academy courses, or answer your own questions — all without having to instal...

Read more
  • AWS
  • Azure
  • gitops
  • Google Cloud Platform
  • lab playground
  • programming
Patrick Navarro
Patrick Navarro
— March 4, 2020

AWS Certifications: How Do They Increase Your Employability and Progress Your Career?

AWS certifications are no walk in the park. They’re designed to validate in-depth, specialist knowledge and comprehensive experience, often requiring months of dedicated studying to earn even for those already working with the cloud platform. But the rewards that AWS professionals ca...

Read more
  • AWS
  • AWS certification
  • certification
Avatar
Chandan Patra
— February 21, 2020

Elasticsearch vs. CloudSearch: AWS Cloud Search Choices

Elasticsearch vs. CloudSearch: What's the main difference? Let's compare AWS-based cloud tools: Elasticsearch vs. CloudSearch. While both services use proven technologies, Elasticsearch is more popular, open source, and has a flexible API to use for customization; in comparison, CloudS...

Read more
  • AWS
  • Azure
  • cloudsearch
  • elasticsearch
Avatar
Andrew Larkin
— February 13, 2020

Cloud Academy Content Roadmap Updates

Welcome to our Q1 2020 roadmap. This is the content we plan to build over the next three months, between February 1 - and April 30, 2020. Let's look at some of our roadmap highlights. Atlassian Bamboo for CI/CD We had a lot of requests for practical guides on how to apply DevOps tool...

Read more
  • Artificial Intelligence
  • AWS
  • Azure
  • Docker
  • Google Cloud Platform
  • Kubernetes
  • Machine Learning
Alisha Reyes
Alisha Reyes
— February 7, 2020

New on Cloud Academy: Git Labs, CKA and CKAD Lab Challenges, AWS and Azure Learning Paths, AGILE, and Much More

We just kicked off our first Free Weekend of 2020. This means we've unlocked our Training Library for just 72 hours. Until Sunday at 11:59 pm (PST), you can get unlimited access to our industry-leading learning paths, courses, certification prep exams, and our most popular hands-on labs...

Read more
  • agile
  • AWS
  • Azure
  • Google Cloud Platform
  • Linux
  • OWASP
  • programming
  • red hat
  • scrum
Avatar
Stuart Scott
— February 6, 2020

How to Encrypt an EBS Volume

Keeping data and applications safe in the cloud is one of the most visible challenges facing cloud teams in 2020. Cloud storage services where data resides are frequently a target for hackers, not because the services are inherently weak but because they are often improperly configured....

Read more
  • AWS
  • EBS
  • Encryption