You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I am adding a JWT authorizer, which is supposed to send requests to the Auth0 authorization server, to each endpoint's Lambda function based on the deployment stage, I am receiving the error below when I tried to deploy by serverless deploy --stage local --region ap-east-1 --verbose:
yarn run v1.22.19
$ bash ./scripts/deploy-local.sh
$ tsc
make_bucket failed: s3://myapp-users-local-deployments-ap-east-1 An error occurred (BucketAlreadyOwnedByYou) when calling the CreateBucket operation: Your previous request to create the named bucket succeeded and you already own it.
To ensure safe major version upgrades ensure "frameworkVersion" setting in service configuration (recommended setup: "frameworkVersion: ^3.38.0")
(node:57760) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.
Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the migration guide at https://a.co/7PzMCcy
(Use `node --trace-warnings ...` to show where the warning was created)
Deploying myapp-users to stage local (ap-east-1)
✖ Stack myapp-users-local failed to deploy (7s)
Environment: darwin, node 18.18.0, framework 3.38.0, plugin 7.2.0, SDK 4.5.1
Credentials: Local, "default" profile
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
Function "localAuthorizer" doesn't exist in this Service
Each function uses a custom variable that is returned based on the deployment stage and originally defined as a set of function definitions. Each function definition in the set is stage-based and uses an authorizer, which is defined in the provider.httpApi section and corresponds to the deployment stage.
Issue description
As I am adding a JWT authorizer, which is supposed to send requests to the Auth0 authorization server, to each endpoint's Lambda function based on the deployment stage, I am receiving the error below when I tried to deploy by
serverless deploy --stage local --region ap-east-1 --verbose
:Context
I have defined 3 authorizers under the
provider
section and each is used for a specific stage or a specific group of stages. Such implementation is based on theJWT Authorizers
section of the docmentation here: https://www.serverless.com/framework/docs/providers/aws/events/http-api#jwt-authorizersEach function uses a custom variable that is returned based on the deployment
stage
and originally defined as a set of function definitions. Each function definition in the set is stage-based and uses an authorizer, which is defined in theprovider.httpApi
section and corresponds to the deploymentstage
.My serverless.yml is as follows:
Please note that the
identitySource
,issuerUrl
andaudience
are set according to this blog by Auth0: https://auth0.com/blog/securing-aws-http-apis-with-jwt-authorizers/#Add-a-JWT-Authorizer-to-Your-APIThe text was updated successfully, but these errors were encountered: