I’m creating an AWS UserPool in my serverless.yml. I want to use that user pool for authorization on some endpoints. I can easily do that by setting the authorizer to the ARN of the generated user pool, but then I need to check for the ARN beforehand.
Can I somehow set the authorizer by the resource name, e.g.,
authorizer: Ref: CognitoUserPoolMyUserPool
or something similar?