remind101 / stacker_blueprints

DEPRECATED - moved to:
https://github.com/cloudtools/stacker_blueprints
BSD 2-Clause "Simplified" License
39 stars 53 forks source link

Custom resource for dynamodb table #25

Open mwildehahn opened 7 years ago

mwildehahn commented 7 years ago

The default cloudformation dynamodb stack is really rigid. Updating AttributeDefinitions requires a replacement: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-attributedef and you can't have a global secondary index that references a non-attribute definition.

You CAN update a table and add attribute definitions/GSIs with the boto3 api: http://boto3.readthedocs.io/en/latest/reference/services/dynamodb.html#DynamoDB.Client.update_table.

A custom resource that just piped args to the create_table and update_table would make it much easier to evolve dynamodb schema.