DynamoDB GSI backups cost/functionality when using AWS Backups

2 minute read
Content level: Intermediate
1

Understand how AWS backup stores DynamoDB backups

When backing up a table using the AWS Backup tool, you may notice that AWS Backup size doesn't reflect your Table + Global Secondary Indexes. Global Secondary Indexes are a projection of the main table through the partition key. A projection is the set of attributes that is copied from a table into a Global Secondary Index(GSI). The partition key and sort key of the table are always projected into the index, additionally, you can project other attributes to support your application's query requirements. When you query an index, Amazon DynamoDB can access any attribute in the projection as if those attributes were in a table of their own.

Now imagine we're going to backup a table, although the base table + GSI size ~15TB total, due to the projection to the GSI we only see 5TB on the backup size. When we restore that table, the GSIs will be restored as well as the table! From an AWS Backup cost perspective GSI's are cheaper. Please refer to the documentation below if you need further clarification on costs or projection.

profile pictureAWS
EXPERT
published a month ago93 views