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?