Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why playing with AWS DynamoDb "Hello world" produces read/write alarms?

I'v started to play with DynamoDb and I'v created "dynamo-test" table with hash PK on userid and couple more columns (age, name). Read and write capacity is set to 5. I use Lambda and API Gateway with Node.js. Then I manually performed several API calls through API gateway using similar payload:

{
  "userId" : "222",
   "name" : "Test",
   "age" : 34
 }

I'v tried to insert the same item couple times (which didn't produce error but silently succeeded.) Also, I used DynamoDb console and browsed for inserted items several times (currently there are 2 only). I haven't tracked how many times exactly I did those actions, but that was done completely manually. And then after an hour, I'v noticed 2 alarms in CloudWatch:

INSUFFICIENT_DATA dynamo-test-ReadCapacityUnitsLimit-BasicAlarm ConsumedReadCapacityUnits >= 240 for 12 minutes No notifications

And the similar alarm with "...WriteCapacityLimit...". Write capacity become OK after 2 mins, but then went back again after 10 mins. Anyway, I'm still reading and learning how to plan and monitor these capacities, but this hello world example scared me a bit if I'v exceeded my table's capacity :) Please, point me to the right direction if I'm missing some fundamental part!

like image 553
Centurion Avatar asked Apr 27 '16 11:04

Centurion


People also ask

Is DynamoDB good for writes?

High-performance reads and writes are easy to manage with DynamoDB, and you can expect performance that is effectively constant across widely varying loads.

Does DynamoDB have read replica?

DynamoDB allows you to replicate tables across multiple regions. You can read and write to any replica across the globe at any time. If the same item is modified in two regions, the last write wins.

What are the main benefits of using Amazon DynamoDB?

Amazon DynamoDB is a fully managed, serverless, key-value NoSQL database designed to run high-performance applications at any scale. DynamoDB offers built-in security, continuous backups, automated multi-Region replication, in-memory caching, and data import and export tools.

Is DynamoDB schema on read?

Schema-on-Read provides a unique benefit for Big Data in that data can be written to DynamoDB without having to know exactly how it will be retrieved.


1 Answers

It's just an "INSUFFICIENT_DATA" message. It means that your table hasn't had any reads or writes in a while, so there is insufficient data available for the CloudWatch metric. This happens with the CloudWatch alarms for any DynamoDB table that isn't used very often. Nothing to worry about.

EDIT: You can now change a setting in CloudWatch alarms to ignore missing data, which will leave the alarm at its previous state instead of changing it to the "INSUFFICIENT_DATA" state.

like image 113
Mark B Avatar answered Oct 14 '22 21:10

Mark B