0

I would like to know what are the total WCUs consumed to delete an item less than 1kb which has a TTL in the main table and GSI?

About TTL, we know that after the date and time of the specified timestamp, DynamoDB deletes the item from the table without consuming any write throughput.

But what if that item exists also in a GSI? Are any WCUs consumed to delete the item from GSI? What if that item in GSI also had a TTL? Would that mean there are 0 WCUs consumed to delete the item from the table and GSI?

radrt
  • 45
  • 7

1 Answers1

0

If you let TTL delete it then there’s no cost. If you delete it yourself then you pay for the write throughout, of course.

The TTL setting only applies to the base table. An item deleted from the base table will get deleted in the GSIs also, and at no charge.

hunterhacker
  • 6,378
  • 1
  • 14
  • 11
  • 1
    Thanks, but could you point to some resources/documentation? I couldn't find anything. – radrt May 26 '22 at 08:41
  • The official docs are at https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html and with them you’ll notice you can’t setup a TTL on a GSI. I think the docs assume it’s assumed the reader will expect that removing an item from the base table removes it from the GSIs. And that since TTL deletes are free that then the GSI delete is free also. If you find it unclear, you can leave a feedback on the docs. – hunterhacker May 26 '22 at 17:16