Hey all! Just curious if any of you use Dynamoose...
# help
d
Hey all! Just curious if any of you use Dynamoose in your App and how you define your tables in the SST stack code if you do? Would you copy the table definition in the stack and into dynamoose or just allow dynamoose to create the tables and manage them from the code. Also do you use dynamoDB local and how do you have SST create the table locally instead of in AWS for local environments?
g
Defining the table as part of SST would be better. Also SST is specifically made for live local dev, meaning you connect to live resources with real credentials which is way better than trying to mock aws services IMO
c
I also think defining the table as part of SST would be much better. dynamoose has some annoying bugs that I have faced before (like be re-creating indexes without necessity)
what I’m currently doing is to create the tables via CloudFormation and use it on Dynamoose with
update: false
for that I try to use generic names for the table attributes definitions (like pk and sk and gsi for indexes), so I don’t lose much time defining the table again on the Dynamoose model
d
Ok thanks for the advice I think I will keep the definition in the stack and just copy it into dynamoose and not have it create the tables. The only reason I wanted to do local dynamo was to not have a bunch of tables in AWS for each dev environment but that's not really that important.