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

JP (junaway)

11/18/2021, 3:21 PM
Yan Cui voting in favor of nested stacks for large AppSync projects @Frank
t

thdxr

11/18/2021, 4:14 PM
What are the advantages, always been kinda confused by it
j

JP (junaway)

11/18/2021, 4:15 PM
More than advantages, a necessity. It's easier with AppSync (compared to other API types and configurations) to reach the 500 resource limit. And nested stacks seem to be the go-to solution.
f

Frank

11/18/2021, 4:32 PM
Interesting… is this a blog post on this? I’d love to see his reasoning.
j

JP (junaway)

11/18/2021, 4:36 PM
f

Frank

11/18/2021, 4:57 PM
Thanks @JP (junaway)! Just read it.. I’m guessing the main reason Yan prefer nested stack over multi-stacks is the easiness of sharing resources across stacks. With multi-stack setup, you’d have to export and than import. Also you can’t export Lambda Version ARNs because they change on every deploy, and you can’t change the value of an export. Cross stack sharing resources is much easier in SST than Serverless Framework/SAM, it’s really simple as passing a variable from one stack to another. We also made exporting Lambda Version ARNs doable. Behind the scene, SST would create an SSM parameter with the ARN value and share the SSM key across stacks. When the ARN changes, the SSM key remains the same, hence allowed by CloudFormation. So I think multi-stack should work just fine. It will also deploy faster than a nested stack. But I’d like to hear from folks that are working with large AppSync projects 😂
j

JP (junaway)

11/18/2021, 4:59 PM
Thanks Frank. I didn't have an opinion myself but I know you did, hence me taggin you. The lambda version arn sharing bit is interesting.