A library that helps you create and migrate DynamoDB databases.
Changing DynamoDB tables is impossible post-creation.
The commonly accepted 'workaround' is to create a new table that does have the correct properties, and migrate the existing data.
This tool will help you do that.
See the examples-folder for up-to-date example scripts, and example code how to incorporate this in your CI/CD system.
Definitely! Feel free to report bugs, recommend new features or open a PR.
Each script is responsible for a single table. Create multiple tables by writing multiple scripts.
The dynamodb_metadata-table lists all AWS resources that have been created when running the script.
If an AWS calls fails, for instance because the script does not have the required permissions, a rollback is executed automatically.
For instance, this is the expected workflow:
- Create a DynamoDB table
- Create an IAM role
- Create an AWS Lambda function
Due to incorrect permissions, this could be an actual workflow:
- Create a DynamoDB table
- Try to create an IAM role without having correct permissions
- Retry step 2, just in case it's an intermittent failure
- Rollback: Delete the created DynamoDB table
- Re-raise the original exception
It is now up to the user to fix the incorrect permissions, and re-run the script.