- Create the project from the following template:
$ sls create --template-url https://github.com/danteinc/js-cloud-native-cookbook/tree/master/ch5/custom-authorizer --path cncb-custom-authorizer
- Navigate to the cncb-custom-authorizer directory with cd cncb-custom-authorizer.
- Review the file named serverless.yml with the following content:
service: cncb-custom-authorizerprovider: name: aws # cfnRole: arn:aws:iam::<account-number>:role/${opt:stage}-cfnRole ...functions: authorizer: handler: handler.authorize environment: AUD: ${cf:cncb-cognito-pool-${opt:stage}.userPoolClientId} ISS: ${cf:cncb-cognito-pool-${opt:stage}.userPoolProviderURL} JWKS: ${self:functions.authorizer.environment.ISS}/.well-known/jwks.json DEBUG: '*' ...