DEV Community

Cover image for Create your first AWS Billing Alarm

Create your first AWS Billing Alarm

Haseeb Burki on September 01, 2019

Whether you're a novice, just starting or a highly skilled AWS ninja, you need to keep an eye on those pesky AWS bills. Billing is a very important...
Collapse
 
andrewbrown profile image
Andrew Brown šŸ‡ØšŸ‡¦

If you're also looking to monitor your expenses on a monthly or quarterly or manual interval and want a report than consider also turning on AWS Budgets.

The first two budgets are free.

Alarms aren't free but they are inexpensive starting at $0.1 per triggered event. I noticed Alarms costs can pile up quickly with DynamoDB and its auto-scaling features. Since it at least creates three alarms for read and then write and for each index you create. My alarms with only a few DynamoDB tables were getting into $10-30 USD a month. You can, in this case, delete the alarms you don't need that are generated to reduce these costs.

Collapse
 
hzburki profile image
Haseeb Burki

Cool !! Thanks for the info, AWS budgets looks promising. I'll explore it further.

Also, I'd heard that DynamoDB can get really expensive when it comes to scaling. This is a really cool example you provided.

Appreciate it !! :D

Collapse
 
andrewbrown profile image
Andrew Brown šŸ‡ØšŸ‡¦

To reduce costs for DynamoDB for write capacity a common strategy is to put SQS in front DynamoDB to buffer these reads and writes.

To reduce costs for DynamoDB for read capacity you can put ElastiCache infront of it.

There is DAX which is a caching solution for DynamoDB but I've haven't crunched the numbers to see if it's more cost-effective than ElastiCache so I may be utilizing an outdated caching solution.

Thread Thread
 
hzburki profile image
Haseeb Burki

I don't have any knowledge on DyanmoDB but putting SQS infront of DynamoDB will only limit the concurrent number of writes. The number of total requests will still remain the same. How does that reduce costs?

Also won't this slow down the write capability?

Thread Thread
 
andrewbrown profile image
Andrew Brown šŸ‡ØšŸ‡¦

It slows down the write capacity, since the higher the capacity the more you pay.
It can be cheaper than paying for bursts of traffic and write capacity going up.

It just really depends how long those burts occur for, so there is a sweet spot to it.

This actually appears as an exam question on the Solution Architect Professional.

Thread Thread
 
rehanvdm profile image
Rehan van der Merwe

The catch being that you can only go SQS -> Dynamo if your system is already async. Otherwise you have to do a bit of redesigning, correct?