https://serverless-stack.com/ logo
#guide
Title
# guide
j

jamlen

12/20/2021, 9:07 AM
Why does the guide in the Best Practices use Serverless Framework for the backend APIs and only uses SST for the infrastructure repo? There is no rationale given for this that I can see and I'm finding it confusing since I've just been using SST for everything up until this point. Is it just to demonstrate that you can use it or is there an advantage to it? If it is just a choice thing, then on each section of the Best Practices it should show how to make it work in SST as well, as I'm wanting to follow the these best practices and build a production ready, scalable app, but have to try to decipher the yaml serverless bits.
f

Frank

12/20/2021, 9:11 AM
Hey @jamlen, sorry for the confusion. The best practice guide was originally written in Serverless Framework a while back. We will be updating it to use SST, most likely in January.
cc’ing @Jay (our main author for the guide)
j

jamlen

12/20/2021, 9:12 AM
Thanks Frank! I'm going to be starting to build my main application in January so may ping when I'm confused!
Quickly, is there a distinct benefit to using both frameworks like this in the guide? I'd prefer to stick to just SST
k

Kujtim Hoxha

12/20/2021, 9:58 AM
@jamlen, I use only SST for my app and found it to be all I need, the only thing I could think of that you would benefit from using Serverless Framework are some plugins that SST does not support yet.. But in many cases those are easily reproduced with some CDK constructs + some custom lamdba code. SST in my opinion is way more powerful than Serverless Framework because you get the benefit of using the full CDK
j

jamlen

12/20/2021, 10:00 AM
Thanks @Kujtim Hoxha that is what I was hoping for! How do you do the cross-stack reference import in SST/CDK from https://serverless-stack.com/chapters/cross-stack-references-in-serverless.html
in the yaml its
tableName: !ImportValue ${self:custom.sstApp}-ExtTableName
k

Kujtim Hoxha

12/20/2021, 10:03 AM
So for my usecase I simply have the other stack as a dependency something like :
You could also just pass the table as a dependency here.
j

jamlen

12/20/2021, 10:04 AM
Ahh ok, so not with them split into a separate repo then.
k

Kujtim Hoxha

12/20/2021, 10:04 AM
Nope I use a monorepo
j

jamlen

12/20/2021, 10:04 AM
Yeah that's what I'm planning on using too.
k

Kujtim Hoxha

12/20/2021, 10:05 AM
Makes life easier 😂
3 Views