How do I create a Cognito authorizer for the Amplify REST API?

0

I was using the Amplify React project and added an API Gateway (REST API).

I want to add a Cognito authorizer for that REST API.

Its default JSON is

{
  "version": 1,
  "paths": {
    "/notification": {
      "name": "/notification",
      "lambdaFunction": "WebhookNotification",
      "permissions": {
        "groups": {
          "Admin": [
            "create",
            "read",
            "update",
            "delete"
          ],
          "Customers": [
            "create",
            "read",
            "update",
            "delete"
          ]
        },
        "setting": "private"
      }
    }
  }
}
1 回答
0

In order to define Cognito authorization you can refer the below link which helps you to define the same in your amplify application and the changes that are required to be made.

[+] https://docs.amplify.aws/javascript/build-a-backend/restapi/customize-authz/#cognito-user-pool-authorization

AWS
Srinath
已回答 4 个月前
profile picture
专家
已审核 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则