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 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:
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.
You can get total read capacity consumed for a table and its global secondary index.
Provides write capacity units consumed within a period of time. You can track throughput as a provision.
Provides the number of write capacity units that are consumed while inserting a new global secondary index in a table.
This metric gives a percentage of completion of a new global secondary index in a table.
Provides a count of write throttle events recorded when the new global secondary index is added in a table.
This metric gives a count of provision read capacity for a global secondary index or table.
This metrics provides a count of provision write functions for a global secondary index or table.
This metric increases ReadThrottleEvents by one if the requested invent is throttled.
This metric returns a count of bytes from GetRecords operations during the specified period.
Returns the count of items from Query or scans operations during a specific period.
This metric provides stream records return by GetRecords operations during the specific period.
This provides the time elapsed for successful requests and a count of successful requests.
This metric request to DynamoDB generates an HTTP 500 status code during a specific period.
If any event of a request crosses the throughput limit as provisioned in advance, the ThorttleRequests metric is increased by one.
The UserErrors metric request to DynamoDB generates an HTTP 400 status code during a specific period.
This metric makes a request to DynamoDB when write capacity units for a table or a global secondary index exceed the provisioned write capacity.
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.
New Content: AWS Terraform, Java Programming Lab Challenges, Azure DP-900 & DP-300 Certification Exam Prep, Plus Plenty More Amazon, Google, Microsoft, and Big Data Courses
This month our Content Team continues building the catalog of courses for everyone learning about AWS, GCP, and Microsoft Azure. In addition, this month’s updates include several Java programming lab challenges and a couple of courses on big data. In total, we released five new learning...
Where Should You Be Focusing Your AWS Security Efforts?
Another day, another re:Invent session! This time I listened to Stephen Schmidt’s session, “AWS Security: Where we've been, where we're going.” Amongst covering the highlights of AWS security during 2020, a number of newly added AWS features/services were discussed, including: AWS Audit...
AWS re:Invent: 2020 Keynote Top Highlights and More
We’ve gotten through the first five days of the special all-virtual 2020 edition of AWS re:Invent. It’s always a really exciting time for practitioners in the field to see what features and services AWS has cooked up for the year ahead. This year’s conference is a marathon and not a...
WARNING: Great Cloud Content Ahead
At Cloud Academy, content is at the heart of what we do. We work with the world’s leading cloud and operations teams to develop video courses and learning paths that accelerate teams and drive digital transformation. First and foremost, we listen to our customers’ needs and we stay ahea...
Excelling in AWS, Azure, and Beyond – How Danut Prisacaru Prepares for the Future
Meet Danut Prisacaru. Danut has been a Software Architect for the past 10 years and has been involved in Software Engineering for 30 years. He’s passionate about software and learning, and jokes that coding is basically the only thing he can do well (!). We think his enthusiasm shines t...
New Content: AWS Data Analytics – Specialty Certification, Azure AI-900 Certification, Plus New Learning Paths, Courses, Labs, and More
This month our Content Team released two big certification Learning Paths: the AWS Certified Data Analytics - Speciality, and the Azure AI Fundamentals AI-900. In total, we released four new Learning Paths, 16 courses, 24 assessments, and 11 labs. New content on Cloud Academy At any ...
New Content: Azure DP-100 Certification, Alibaba Cloud Certified Associate Prep, 13 Security Labs, and Much More
This past month our Content Team served up a heaping spoonful of new and updated content. Not only did our experts release the brand new Azure DP-100 Certification Learning Path, but they also created 18 new hands-on labs — and so much more! New content on Cloud Academy At any time, y...
AWS Certification Practice Exam: What to Expect from Test Questions
If you’re building applications on the AWS cloud or looking to get started in cloud computing, certification is a way to build deep knowledge in key services unique to the AWS platform. AWS currently offers 12 certifications that cover major cloud roles including Solutions Architect, De...
Overcoming Unprecedented Business Challenges with AWS
From auto-scaling applications with high availability to video conferencing that’s used by everyone, every day — cloud technology has never been more popular or in-demand. But what does this mean for experienced cloud professionals and the challenges they face as they carve out a new p...
Constant Content: Cloud Academy’s Q3 2020 Roadmap
Hello — Andy Larkin here, VP of Content at Cloud Academy. I am pleased to release our roadmap for the next three months of 2020 — August through October. Let me walk you through the content we have planned for you and how this content can help you gain skills, get certified, and...
New Content: Alibaba, Azure AZ-303 and AZ-304, Site Reliability Engineering (SRE) Foundation, Python 3 Programming, 16 Hands-on Labs, and Much More
This month our Content Team did an amazing job at publishing and updating a ton of new content. Not only did our experts release the brand new AZ-303 and AZ-304 Certification Learning Paths, but they also created 16 new hands-on labs — and so much more! New content on Cloud Academy At...
Blog Digest: Which Certifications Should I Get?, The 12 Microsoft Azure Certifications, 6 Ways to Prevent a Data Breach, and More
This month, we were excited to announce that Cloud Academy was recognized in the G2 Summer 2020 reports! These reports highlight the top-rated solutions in the industry, as chosen by the source that matters most: customers. We're grateful to have been nominated as a High Performer in se...