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 Risposta
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
con risposta 4 mesi fa
profile picture
ESPERTO
verificato un mese fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande