How do I create an Alarm to detect DynamoDb limits have reached a certain percent and then increase it

送分小仙女□ 提交于 2019-12-01 18:22:31

When running Amazon's wizard to create a table, it suggests to create an alarm at 80% threshold and to link it to an SNS topic.

Under the hood, for R/W capacity of 1, this creates an alarm on

  • ConsumedReadCapacityUnits >= 240 for 60 minutes
  • ConsumedWriteCapacityUnits >= 240 for 60 minutes

240 = 0.8*1*60*5 that is to say, capacity(1) * seconds_in_5_minutes(300) * threshold(0.8). 60 minutes is the alarm period. You can shorten down to 5 min but this might increase the number of false positive.

In other words, the alarm is triggered every time the sum of the consumed capacity units on ranges of 5 min exceeds the 24 treshold for at least 1 hour.

note: 5 min corresponds to the sampling period.

In the SNS console, you can add 'subscribers' to a topic. They can be e-mails, HTTP(S) callbacks, ... This allow you to contact multiple human/machines.

Every time your scaling logic is triggered, you will need to use the API to automatically update the alarms using this formula.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!