Ross Gerbasi
01/15/2022, 2:16 AMtable already exists
error. Does SST have anyway to help with this? Maybe not failing but using the table instead? I guess I worry about down the road, a year from now if something gets messed up, we blow away a stack and redeploy we will have a lot of data in dyanmo. Won't be as simple as delete the table and redeploy.Carlos Daniel
01/15/2022, 9:12 AMtemp-table
)
• delete the old one
• deploy the new one through SST
• copy data from the temp-table
to the new one
I have a lambda that does that, if you think it’s a good solution - and it’s made with SST 😄
https://github.com/carlosdnba/copy-ddb-tableRoss Gerbasi
01/15/2022, 4:07 PMCarlos Daniel
01/15/2022, 6:25 PMRoss Gerbasi
01/15/2022, 6:27 PMCarlos Daniel
01/15/2022, 8:09 PMCarlos Daniel
01/15/2022, 8:10 PMCarlos Daniel
01/15/2022, 8:10 PMFrank
DESTROY
for non-prod stages. So i can blow them away and not leaving any dangling resources in the account.Frank
Ross Gerbasi
01/16/2022, 6:51 PMstage === 'production' || stage === 'staging'
or do you use an ENV variable like PERSIST_DYNAMODB
?
Secondly, if you do not do this in production and do not separate your data into another stack, what do you do if you nee to blow away production in an emergency? How do you re-link the ddb to your stacks that need it?