3
votes

I'm newbie to dynamodb, I have just 10 items and 1 global secondary Index with Read/write capacity units 5(minimum) which cost around $6/2days which is unacceptable for me because I have used only 0.01% of my actual needs I have gone through some documentation in aws dynamodb price reduction non helped me, because AWS recommend to avoid sudden spike read using query or scan, which is impossible to get more than one item with Partition key alone.

Tables as follows

Add_Employee

Add_Stocks

Add_vendor

All above table have read/write capacity units 1 and each have one global secondary index read/write capacity units 1. All tables are config within specified region Asia Pacific (Mumbai)

Here is my billing for reference

$0.00 per hour for 25 units of read capacity for a month (free tier)18,600 ReadCapacityUnit-Hrs $0.00

$0.00 per hour for 25 units of write capacity for a month (free tier)18,600 WriteCapacityUnit-Hrs $0.00

$0.000148 per hour for units of read capacity beyond the free tier 6,723 ReadCapacityUnit-Hrs $1.00

$0.00074 per hour for units of write capacity beyond the free tier 6,723 WriteCapacityUnit-Hrs $4.98

Thanks in advance

1
You should be completely within the free tier. It sounds like you have your table(s) configured wrong. Please post the exact read/write capacity units of each table, and each global secondary index in your account. And make sure you don't have any tables defined in other regions.Mark B
I would file a ticket with Amazon support over this.Mark B
That's great. Thank youAbubackar Hilmy
You can now autoscale dynamodb capacity docs.aws.amazon.com/amazondynamodb/latest/developerguide/…strongjz

1 Answers

1
votes

You're not just paying for actual throughput, you're paying for provisioned throughput.

Looking at The Dynamo cost page, this means you are paying $0.0065 per throughput-hour each table exists per month, minus the free-tier hours.

Based on your table names, I'm guessing you are not following the best practice of using 1 de-normalized table table for everything. You may be better off using an RDS instance, which will not charge by the table, but by the hour (it's an EC2 instance behind the scenes).

Cost Breakdown

The default is 5 provisioned read/write units, and there are 720 hours in a 30-day month

$0.0065 * 5 * 720 = $24.37 a month per table

The free tier generally allows one table for free a month.

Per AWS docs you must have at least 1 provisioned unit.

How to Save

  • Make sure you're following the best practice of using 1 de-normalized table

  • For any dev work, make sure both read and write provisions are set to 1 ($0.0065 * 1 * 720 = $4.68 a month per table)

  • If you know you're going to be away for a while, remove the stack from AWS. You're only charged while the table(s) exists.

By limiting read/write units you should be able to bring the cost down to ~$5.00 a table per dev.

DO NOT TURN ON AUTO-SCALING

A commenter suggested auto-scaling. Per docs, you'll be charged for at least 5 units, which is what you are paying now.

This AWS forum link is about the same thing.