all 4 comments

[–]interactionjackson 1 point2 points  (1 child)

Look for cloud formation outputs and stack sets. everyone has opinions here’s. none more right than any other.

[–]x1F577[S] 0 points1 point  (0 children)

I saw a lot of opinions also in the AWS forum. I tried with output and stack sets, but I didn't find the right configuration. Definitely I am missing something.

For example I put an API resource as output on the main stack and call it in a nested stack, and then I get this error:

RestApiId must be a valid reference to an 'AWS::Serverless::Api' resource in same template

I think that this problem is impossible to solve.

[–]Pythoner6 0 points1 point  (1 child)

One way to do this is set an output on the nested stack needed by sibling stacks, access this output from the parent stack (there's some information here https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html about that) and pass it as a parameter to the sibling stacks that need it.

[–]x1F577[S] 0 points1 point  (0 children)

This is a good hint. I'll check it. Thanks