Yan Cui voting in favor of nested stacks for large...
# random
j
Yan Cui voting in favor of nested stacks for large AppSync projects @Frank
t
What are the advantages, always been kinda confused by it
j
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
Interesting… is this a blog post on this? I’d love to see his reasoning.
j
f
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
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.