Open nikoskip opened 4 years ago
Hi!
I'm trying to achieve something like this guide: https://github.com/serverless/examples/tree/master/aws-node-auth0-custom-authorizers-api
But when I try to deploy I'm getting this error: Event references not configured authorizer 'authorize'.
I think the only difference is that I'm using httpApi instead of http. This is my configuration:
httpApi
http
service: xxxx frameworkVersion: ">=1.78.0 <2.0.0" plugins: - serverless-dotenv-plugin - serverless-offline provider: name: aws runtime: nodejs12.x region: ${env:AWS_LAMBDA_REGION} stage: ${ opt:stage, 'local' } cors: allowedOrigins: - "*" custom: serverless-offline: httpPort: ${env:LOCAL_HTTP_PORT} host: 0.0.0.0 # Enables hot reloading (https://github.com/dherault/serverless-offline/issues/864#issuecomment-627419266) useChildProcesses: true functions: jwt-auth: handler: handler.jwt module-activation-sns: handler: handler.sns events: - sns: ${env:AWS_SNS_ARN_MODULE_ACTIVATION} module-activation-http: handler: handler.http events: - httpApi: method: POST path: /module authorizer: jwt-auth
Thanks!
Currently the only way to restrict access to configured HTTP API endpoints is by setting up an JWT Authorizers. LINK
Hi!
I'm trying to achieve something like this guide: https://github.com/serverless/examples/tree/master/aws-node-auth0-custom-authorizers-api
But when I try to deploy I'm getting this error: Event references not configured authorizer 'authorize'.
I think the only difference is that I'm using
httpApi
instead ofhttp
. This is my configuration:Thanks!