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 Answer
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
answered 3 months ago
profile picture
EXPERT
reviewed 24 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions