Cross-Stack References in Serverless

Link to chapter -

Hi! I’m about to split my mono-service to Cross-Stack Multi services and I have a reference to Cognito like this;

    handler: contacts.creation
        Ref: ContactsCognitoUserPool
      - http:
          method: post
          path: contact
            origins: ${self:custom.cors.${self:custom.stage}

How can I specify a reference like this if the pool is not created yet?

You can see an example of this here - We refer to a User Pool that was previously created.

Hi @jayair ! This chapter mentions that “Cross-stack references only apply within a single region. Meaning that an exported value can be referenced by any service in that region”.

What if in the future I wanted to use an AWS service that is not available in the same region of the rest of my stack? What is the best approach one could take?

can a complete example on this page please be provided. Its quite hard to follow what is referencing what as it seems the “examples” are just pasted from different applications referring to things not present in the rest of the example

The main guide used cross-stack references. We talk about it in this chapter here:

Hi! Which should be the best practise if I need the dynamo arn and name? I need the arn to give permission to lambda and the name for the enviroment of the other stack. Should I export both?