How to make the HTTP Authorizer example work?

I am following the official documentation to declare an authorizer (https://www.serverless.com/framework/docs/providers/aws/events/http-api#jwt-authorizers).
In the documentation it mentions a few variables, which I don’t understand how are being declared and accessed correctly:

provider:
  httpApi:
    authorizers:
      someJwtAuthorizer:
        identitySource: $request.header.Authorization
        issuerUrl: https://cognito-idp.${region}.amazonaws.com/${cognitoPoolId}
        audience:
          - ${client1Id}
          - ${client2Id}

In the documentation I can’t see how ${cognitoPoolId} was declared. In my case I have under “Resources” a CF template that declares a AWS::Cognito::UserPool resource and exports the following:

Outputs:
  UserPoolId:
    Value:
      Ref: CognitoUserPool
    Export:
      Name: ${self:provider.stage}-UserPoolId

How would I be able to reference that output in my issuerUrl attribute to configure the authorizer?

I’m nearly certain that Serverless doesn’t create the Cognito instance. You’ll need to do that outside of Serverless, or use another service like Auth0

Once you’ve configured Cognito, you’ll know your PoolId and ClientId.

My suggestion is. Get it configured first, hard code the variables, see if it works.

https://docs.aws.amazon.com/cognito/latest/developerguide/what-is-amazon-cognito.html