You're not authorized to access this resource

I was working on a serverless repository. Everything was working and I was able to deploy properly before, all of the sudden I was met with the error below when I tried to deploy. Now, nothing I do will get the repository to deploy again. I haven’t changed any IAM credentials or anything, and I’m running on a NodeJS v12.X runtime.

 Error: {"errorMessage":"You're not authorized to access this resource. - Please contact support and provide this identifier to reference this issue - XVY4HLWRGK9F"}
  at _callee$ (/Users/jakeengel/.nvm/versions/node/v12.13.1/lib/node_modules/serverless/node_modules/@serverless/platform-sdk/src/utils/checkHttpResponse.js:19:9)
  at tryCatch (/Users/jakeengel/.nvm/versions/node/v12.13.1/lib/node_modules/serverless/node_modules/regenerator-runtime/runtime.js:45:40)
  at Generator.invoke [as _invoke] (/Users/jakeengel/.nvm/versions/node/v12.13.1/lib/node_modules/serverless/node_modules/regenerator-runtime/runtime.js:274:22)
  at Generator.prototype.<computed> [as next] (/Users/jakeengel/.nvm/versions/node/v12.13.1/lib/node_modules/serverless/node_modules/regenerator-runtime/runtime.js:97:21)
  at step (/Users/jakeengel/.nvm/versions/node/v12.13.1/lib/node_modules/serverless/node_modules/@serverless/platform-sdk/dist/utils/checkHttpResponse.js:7:191)
  at /Users/jakeengel/.nvm/versions/node/v12.13.1/lib/node_modules/serverless/node_modules/@serverless/platform-sdk/dist/utils/checkHttpResponse.js:7:361
  at processTicksAndRejections (internal/process/task_queues.js:93:5)

I believe last time I had this error (or perhaps it was similar) was due to the fact that I switched devices (from home PC to work PC) and I was not logged in SLS on that device. Perhaps you need to sls login with your credentials first?

Little bit of a shot in the dark here, as I don’t know your full setup to further help.

Please remove app and org attributes from your serverless.yml file. I think it tries to find app from your serverless account and when it is not able to find it, it throws the error. I fixed this using this method

5 Likes

This fixed it! Thank you!