# How to avoid unexpected charges when using AWS free tier

**URL:** <https://awshq.com/t/how-to-avoid-unexpected-charges-when-using-aws-free-tier/10973>\
**Category:** Billing & Cost\
**Tags:** ec2, billing, dynamodb\
**Created:** [May 31, 2020, 4:16pm UTC](https://awshq.com/t/how-to-avoid-unexpected-charges-when-using-aws-free-tier/10973 "2020-05-31T16:16:26Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![M1keSkydive](https://awshq.com/letter_avatar_proxy/v4/letter/m/a5b964/32.png) [@M1keSkydive](https://awshq.com/u/M1keSkydive)\
**Post date:** [June 1, 2020, 9:02am UTC](https://awshq.com/t/how-to-avoid-unexpected-charges-when-using-aws-free-tier/10973/21 "2020-06-01T09:02:05Z")

</div>

I don’t think anyone has answered the DDB question so I’ll have a go. With provisioned capacity you’re charged for what you provision. So if you make a table with 25 write + 25 read units you’ll pay nothing for the table. You will pay for data storage but it’s very low per GB pricing - you’d need to put a lot of data in before it became significant.

Pitfalls:

If you great a global secondary index you generally want it to have the same capacity as the table for writes (reads can be different) and that’s charged separately. So if you wanted 4 indexes you’d be limited to the table and all 4 indexes at 5 write capacity, for example, to stay free.

Autoscaling can be enabled but won’t respect free tier limits - so if you enable it and push a few hundred requests per second, your table scales up and you get charged.

Table capacity can only change every (I think) 6 hours. So if you decide to test 1k units, you’ll pay that cost for a few hours pro rata.

If you keep your limits at 25 with no autoscaling and then try to push more than 25 requests per second your requests will be throttled. This means retries at best, lost data, application slow downs due to waiting for capacity. Maybe not an issue whilst testing, but you’re maybe going to get a picture of DDB being slow when really your config is limiting it.

---

<div class="post-metadata">

**Author:** ![EaterOfBits](https://awshq.com/letter_avatar_proxy/v4/letter/e/6de8d8/32.png) [@EaterOfBits](https://awshq.com/u/EaterOfBits)\
**Post date:** [June 1, 2020, 9:23am UTC](https://awshq.com/t/how-to-avoid-unexpected-charges-when-using-aws-free-tier/10973/22 "2020-06-01T09:23:58Z")

</div>

> [@M1keSkydive](#):
>
> You have to be using some really meaty stuff (or be hacked) to run up costs of much significance in 6 hours. No basic tutorial should have you creating anything near that charge level, but ultimately if your goal is to …

Yeah I totally agree.

I have seen a topic where someone was trying to train cloudwatch events and ended up creating an infinite loop. By the time the billingalarm flared up it was already a nice sum.  
I’ve added it to signify that even with billing alarms you need a common sense and a healthy paranoia.

Best to remove the resources when one don’t train.

---

<div class="post-metadata">

**Author:** ![cryonine](https://awshq.com/letter_avatar_proxy/v4/letter/c/b77776/32.png) [@cryonine](https://awshq.com/u/cryonine)\
**Post date:** [June 1, 2020, 1:09pm UTC](https://awshq.com/t/how-to-avoid-unexpected-charges-when-using-aws-free-tier/10973/23 "2020-06-01T13:09:10Z")

</div>

> [@M1keSkydive](#):
>
> Aws-vault from 99designs makes this super easy, especially if you’ve got access to multiple AWS accounts with their own unique MFA and roles.

I am a big fan of aws-vault, but it doesn’t set this up for you. It facilitates the use of this on the CLI.

---

<div class="post-metadata">

**Author:** ![M1keSkydive](https://awshq.com/letter_avatar_proxy/v4/letter/m/a5b964/32.png) [@M1keSkydive](https://awshq.com/u/M1keSkydive)\
**Post date:** [June 1, 2020, 3:05pm UTC](https://awshq.com/t/how-to-avoid-unexpected-charges-when-using-aws-free-tier/10973/24 "2020-06-01T15:05:21Z")

</div>

> [@cryonine](#):
>
> I am a big fan of aws-vault, but it doesn’t set this up for you. It facilitates the use of this on the CLI.

Correct

---

<div class="post-metadata">

**Author:** ![Cocoa\_pod](https://awshq.com/letter_avatar_proxy/v4/letter/c/919ad9/32.png) [@Cocoa\_pod](https://awshq.com/u/Cocoa_pod)\
**Post date:** [June 8, 2020, 3:20am UTC](https://awshq.com/t/how-to-avoid-unexpected-charges-when-using-aws-free-tier/10973/25 "2020-06-08T03:20:39Z")

</div>

Thanks everyone for all the helpful advice!

---

<div class="post-metadata">

**Author:** ![iamzapata](https://awshq.com/letter_avatar_proxy/v4/letter/i/34f0e0/32.png) [@iamzapata](https://awshq.com/u/iamzapata)\
**Post date:** [October 5, 2024, 11:21am UTC](https://awshq.com/t/how-to-avoid-unexpected-charges-when-using-aws-free-tier/10973/26 "2024-10-05T11:21:43Z")

</div>

As a frontend developer wanting to learn more abut AWS to be more productive, I think I don’t have the time to invest in watching my billing doesn’t go out of control. Too much work 😕

[Previous page](https://awshq.com/t/how-to-avoid-unexpected-charges-when-using-aws-free-tier/10973.md?page=1)
