Provision DynamoDB local using the same infra-as-code of production
Currently we are creating the tables and appending the data to dynamodb local with awscli:
this is ugly, and duplicated, since we have the infra already defined here:
wouldn't it be awesome to reuse that infra-as-code ?
well, it's possible:
and we can also manage the data as a terraform resource, elegantly (we can load the JSON from a file instead of hard-coding it there as in the example) !!!
https://www.terraform.io/docs/providers/aws/r/dynamodb_table_item.html
example: https://github.com/kamadorueda/tracers/blob/latest/build/launch-db/run.sh