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

Avatar
Michael Sheehy
— August 19, 2019

What Exactly Is a Cloud Architect and How Do You Become One?

One of the buzzwords surrounding the cloud that I'm sure you've heard is "Cloud Architect." In this article, I will outline my understanding of what a cloud architect does and I'll analyze the skills and certifications necessary to become one. I will also list some of the types of jobs ...

Read more
  • AWS
  • Cloud Computing
Avatar
Andrew Larkin
— August 13, 2019

Content Roadmap: AZ-500, ITIL 4, MS-100, Google Cloud Associate Engineer, and More

Last month, Cloud Academy joined forces with QA, the UK’s largest B2B skills provider, and it put us in an excellent position to solve a massive skills gap problem. As a result of this collaboration, you will see our training library grow with additions from QA’s massive catalog of 500+...

Read more
  • AWS
  • Azure
  • content roadmap
  • Google Cloud Platform
Avatar
Adam Hawkins
— August 9, 2019

DevSecOps: How to Secure DevOps Environments

Security has been a friction point when discussing DevOps. This stems from the assumption that DevOps teams move too fast to handle security concerns. This makes sense if Information Security (InfoSec) is separate from the DevOps value stream, or if development velocity exceeds the band...

Read more
  • AWS
  • cloud security
  • DevOps
  • DevSecOps
  • Security
Avatar
Stefano Giacone
— August 8, 2019

Test Your Cloud Knowledge on AWS, Azure, or Google Cloud Platform

Cloud skills are in demand | In today's digital era, employers are constantly seeking skilled professionals with working knowledge of AWS, Azure, and Google Cloud Platform. According to the 2019 Trends in Cloud Transformation report by 451 Research: Business and IT transformations re...

Read more
  • AWS
  • Cloud skills
  • Google Cloud
  • Microsoft Azure
Avatar
Andrew Larkin
— August 7, 2019

Disadvantages of Cloud Computing

If you want to deliver digital services of any kind, you’ll need to estimate all types of resources, not the least of which are CPU, memory, storage, and network connectivity. Which resources you choose for your delivery —  cloud-based or local — is up to you. But you’ll definitely want...

Read more
  • AWS
  • Azure
  • Cloud Computing
  • Google Cloud Platform
Joe Nemer
Joe Nemer
— August 6, 2019

Google Cloud vs AWS: A Comparison (or can they be compared?)

The "Google Cloud vs AWS" argument used to be a common discussion among our members, but is this still really a thing? You may already know that there are three major players in the public cloud platforms arena: Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP)...

Read more
  • AWS
  • Google Cloud Platform
  • Kubernetes
Avatar
Stuart Scott
— July 29, 2019

Deployment Orchestration with AWS Elastic Beanstalk

If you're responsible for the development and deployment of web applications within your AWS environment for your organization, then it's likely you've heard of AWS Elastic Beanstalk. If you are new to this service, or simply need to know a bit more about the service and the benefits th...

Read more
  • AWS
  • elastic beanstalk
Avatar
Stuart Scott
— July 26, 2019

How to Use & Install the AWS CLI

What is the AWS CLI? | The AWS Command Line Interface (CLI) is for managing your AWS services from a terminal session on your own client, allowing you to control and configure multiple AWS services and implement a level of automation. If you’ve been using AWS for some time and feel...

Read more
  • AWS
  • AWS CLI
  • Command line interface
Alisha Reyes
Alisha Reyes
— July 22, 2019

Cloud Academy’s Blog Digest: July 2019

July has been a very exciting month for us at Cloud Academy. On July 10, we officially joined forces with QA, the UK’s largest B2B skills provider (read the announcement). Over the coming weeks, you will see additions from QA’s massive catalog of 500+ certification courses and 1500+ ins...

Read more
  • AWS
  • Azure
  • Cloud Academy
  • Cybersecurity
  • DevOps
  • Kubernetes
Avatar
Stuart Scott
— July 18, 2019

AWS Fundamentals: Understanding Compute, Storage, Database, Networking & Security

If you are just starting out on your journey toward mastering AWS cloud computing, then your first stop should be to understand the AWS fundamentals. This will enable you to get a solid foundation to then expand your knowledge across the entire AWS service catalog.   It can be both d...

Read more
  • AWS
  • Compute
  • Database
  • fundamentals
  • networking
  • Security
  • Storage
Avatar
Adam Hawkins
— July 17, 2019

How to Become a DevOps Engineer

The DevOps Handbook introduces DevOps as a framework for improving the process for converting a business hypothesis into a technology-enabled service that delivers value to the customer. This process is called the value stream. Accelerate finds that applying DevOps principles of flow, f...

Read more
  • AWS
  • AWS Certifications
  • DevOps
  • DevOps Foundation Certification
  • Engineer
  • Kubernetes
Avatar
Vineet Badola
— July 15, 2019

AWS AMI Virtualization Types: HVM vs PV (Paravirtual VS Hardware VM)

Amazon Machine Images (AWS AMI) offers two types of virtualization: Paravirtual (PV) and Hardware Virtual Machine (HVM). Each solution offers its own advantages. When we’re using AWS, it’s easy for someone — almost without thinking —  to choose which AMI flavor seems best when spinning...

Read more
  • AWS
  • Hardware Virtual Machine
  • Paravirtual
  • Virtualization