Reputation: 350
I have a table with GlobalSecondaryIndexes specified in the CloudFormation Template.
I want to remove this indexes from DynamoDb by removing them from CloudFormation Template, but I have an error during deploying: "Property AttributeDefinitions is inconsistent with the KeySchema of the table and the secondary indexes".
Upvotes: 2
Views: 2527
Reputation: 1201
It would help if you posted the CF Template, but I'll give it a stab anyway..
The AttributeDefinitions in the definition can only be for attributes in the Key Schema or indexes that exist, because DynamoDB is schemaless.
If you are removing the GSIs, then you need to remove those attribute definitions as well (unless they exist in the Base Table's Key Schema or LSIs).
HTH
Upvotes: 4