Hi there, is there a way to 'modify' an existing d...
# aws
d
Hi there, is there a way to 'modify' an existing dynamodb table with Pulumi? I've a bunch of tables which get created with a DMS task, I'd like to add streaming to all of them an a lambda handler, if I create a new table I get ... a new table..
w
If the main goal is to create lambda handler that uses the tables, you can create the handler in pulumi and use
getTable
(https://www.pulumi.com/docs/reference/pkg/aws/dynamodb/gettable/) to get the information you need to pass to the handler. If the bigger picture is to bring the tables under Pulumi management, you can import them as per: https://www.pulumi.com/docs/guides/adopting/import/
d
would option 1) modify the table and add a stream?
w
getTable will not bring the table under management and so you would not be able to modify it. Instead, you would have to import the table(s) and then you would be able to modify the resource in your pulumi code. There are a couple of ways to import as described in that document. The command line approach may be best since it can take as input a json of table to import and will produce scaffolding code you can then put in a pulumi program to manage/modify the table(s) going forward.
d
yep trying that thanks a lot