How to add Cognito authentication to a serverless API

Link to chapter — https://serverless-stack.com/examples/how-to-add-cognito-authentication-to-a-serverless-api.html

I’m getting “The specified permissions is not supported.” when trying to run sst start.

Building Lambda function src/private.main
Building Lambda function src/public.main

Error: The specified permissions is not supported.
    at permissions.forEach (/Users/kaimacmaster/Sites/mj-backend/node_modules/@serverless-stack/resources/src/util/permission.ts:104:15)
    at Array.forEach (<anonymous>)
    at Object.attachPermissionsToRole (/Users/kaimacmaster/Sites/mj-backend/node_modules/@serverless-stack/resources/src/util/permission.ts:51:17)
    at Auth.attachPermissionsForAuthUsers (/Users/kaimacmaster/Sites/mj-backend/node_modules/@serverless-stack/resources/src/Auth.ts:249:5)
    at new MyStack (/Users/kaimacmaster/Sites/mj-backend/lib/MyStack.ts:34:10)
    at Object.main (/Users/kaimacmaster/Sites/mj-backend/lib/index.ts:5:3)
    at Object.<anonymous> (/Users/kaimacmaster/Sites/mj-backend/.build/run.js:57:16)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)

There was an error synthesizing your app.

@strangekai Can you paste here the line where you are calling auth.attachPermissionsForAuthUsers to grant the permissions?