5

AWS recently came up with GlobalTable to enable multi-master, fault tolerance setup across different regions. One of the constraints seems to be that the "Table must be empty" to setup GlobalTable.

Question is - Can I start off with 2 regions in US and then expand to other regions as we grow? If yes, above mentioned constraint wouldn't be true.

Has anyone tried GlobalTable yet? any thoughts?

ketan vijayvargiya
  • 5,409
  • 1
  • 21
  • 34
Sahas
  • 3,046
  • 6
  • 32
  • 53

2 Answers2

4

Quick update: as of November 2019 this feature is now available https://aws.amazon.com/about-aws/whats-new/2019/11/you-can-now-enhance-availability-of-your-existing-amazon-dynamodb-tables-by-adding-global-replicas/

The catch is that dynamodb tables now come in two versions and all tables created before 11/21/2019 (old version) do not have the feature enabled. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html

ellcraw95
  • 66
  • 6
3

I'll try to answer based on the example you gave.

Let's say you have two DynamoDB tables, one in us-east-1 and another in us-west-1. As per DynamoDB's terminology, these two tables are replica tables. Now, you want to add another table in, say, eu-west-1.

The answer is, you can, but only if the following constraints are met according to this documentation:

  • The table must have the same partition key as all of the other replicas.
  • The table must have the same name as all of the other replicas.
  • The table must have DynamoDB Streams enabled, with the stream containing both the new and the old images of the item.
  • None of the replica tables in the global table can contain any data.

In other words, your tables in us-east-1 and us-west-1 must be empty. If they aren't, you won't be able to add the one in eu-west-1 to the global table.

ketan vijayvargiya
  • 5,409
  • 1
  • 21
  • 34
  • 1
    Thanks. my problem is the last bullet point "None of the replica tables in the global table can contain any data." – Sahas Jun 22 '18 at 16:55
  • Yeah, that's a constraint that you'd have to work around. – ketan vijayvargiya Jun 22 '18 at 18:07
  • 2
    that last point is a HUGE gotcha and severely limits use cases for global tables. how often do you know at the beginning of a project which regions you'll need globally? backfilling/copying ddb records is insanely complex -- especially once those tables grow. another half-baked service from aws... – Cory Mawhorter Jul 24 '19 at 03:03