2020-12-26 14:36

Test-token folder sls deploy not finding authorizer arn

I am trying to sun sls deploy on the test-token folder but am getting

- Function not found: arn:aws:lambda:us-east-1:180971085012:function:uz4g3f3m8i.

previously I Installed the authentication sls and got

  GET - https://uz4g3f3m8i.execute-api.us-east-1.amazonaws.com/dev/authentication/signin/{provider}
  GET - https://uz4g3f3m8i.execute-api.us-east-1.amazonaws.com/dev/authentication/callback/{provider}
  GET - https://uz4g3f3m8i.execute-api.us-east-1.amazonaws.com/dev/authentication/refresh/{refresh_token}

Any ideas what else I can try?


  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • weixin_39802519 weixin_39802519 4月前

    What I tried was: image

    点赞 评论 复制链接分享
  • weixin_39980360 weixin_39980360 4月前

    ok, can you run the sls info in the authentication directory? It should display the name of the authorizer function.

    The output something like this:

    Service Information
    service: dev-auth
    stage: dev
    region: eu-central-1
    api keys:
      GET - https://**********.execute-api.eu-central-1.amazonaws.com/dev/authentication/signin/{provider}
      GET - https://**********.execute-api.eu-central-1.amazonaws.com/dev/authentication/callback/{provider}
      GET - https://**********.execute-api.eu-central-1.amazonaws.com/dev/authentication/refresh/{refresh_token}
      signin: dev-auth-dev-signin
      callback: dev-auth-dev-callback
      refresh: dev-auth-dev-refresh
      authorize: dev-auth-dev-authorize
      schema: dev-auth-dev-schema

    The authorize function name in my case is dev-auth-dev-authorize which can be found from functions -> authorize. Take that name and add it to the authorizer arn arn:aws:lambda:region:your-account-id:function:dev-auth-dev-authorize

    点赞 评论 复制链接分享
  • weixin_39802519 weixin_39802519 4月前

    Cool thanks

    点赞 评论 复制链接分享
  • weixin_39802519 weixin_39802519 4月前

    Why did you decide to split the serverless.yml into two?

    点赞 评论 复制链接分享
  • weixin_39980360 weixin_39980360 4月前

    Hi , the last part should be something like serverless-authentication-dev-authorize, where serverless-authentication is the service name you have defined in authentication service, dev is the stage and authorize is the name of the authorize function. arn:aws:lambda:us-east-1:180971085012:function:serverless-authentication-dev-authorize

    The function name should also be displayed after those endpoint when you deploy the authentication service or run sls info in authentication service root directory.

    点赞 评论 复制链接分享