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 Antwort
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
beantwortet vor 4 Monaten
profile picture
EXPERTE
überprüft vor einem Monat

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen