diff --git a/moto/dynamodb2/models.py b/moto/dynamodb2/models.py index c4aa1023..db6bf04a 100644 --- a/moto/dynamodb2/models.py +++ b/moto/dynamodb2/models.py @@ -706,7 +706,9 @@ class DynamoDBBackend(BaseBackend): gsis_by_name[gsi_to_create['IndexName']] = gsi_to_create - table.global_indexes = gsis_by_name.values() + # in python 3.6, dict.values() returns a dict_values object, but we expect it to be a list in other + # parts of the codebase + table.global_indexes = list(gsis_by_name.values()) return table def put_item(self, table_name, item_attrs, expected=None, overwrite=False):