Tim Alander
02/08/2022, 4:12 AMAPI.ts
--> this uses sst.Api
Storage.ts
--> this uses rds.ServerlessCluster
How can I give the API stack permission to access the RDS instance. I see examples where you can do api.attachPermissions
from within API.ts
, but then I don't have reference to the RDS construct.
Is there a pattern for passing around construct references in the constructors of the stacks? How else would you accomplish this?
Thanks!Akos
02/08/2022, 10:53 AMpublic readonly db: rds.ServerlessCluster
in Storage.ts
• and pass the db
into the API
stack via constructor props.Akos
02/08/2022, 10:53 AMFrank