Just start to work with AWS lambda and DynamoDB, and can't understand is it possible to setup some kind of migration tool like liquibase or flyway. My goal is upload lambda function to cloud, and be sure that my dynamodb instance contain latest changes, or will create all required tables.
For now I can find only ways how to create table in dynamodb, and I suppose that create and update is similar operations. But I can't understand how to run this code with lambda update. Also, I will have many lambda functions, and most probably all of them will use same tables. Is there way, how to configure it? How to manage state of dynamodb? Or I should just adjust dynamodb instance from aws UI?
Any suggestions appreciated.
DynamoDB is not the best option for strong-schemed migration-ready DB usage. But, the whole infrastructure can be easily maintained using CloudFormation templates (or, what I suggest more, SAM/CDK). What can You achieve using CF? I one single stack update You can add/remove DDB tables, change indexes, change permissions for resources, update lambda code, and many more. If anything fails it will be rollbacked to a previous, stable state. Please check this out: AWS SAM AWS CDK
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With