AWS Amplify AppSync Cognito User Pool

0

Hello there, I've Cognito configured to authorize my users. The sign in and sign up is working fine. Now I want my users to be able to create data via an AppSync API. I've configured to use Cognito User Pool. But somehow if I want to create data via a mutation I get the error that I'm not authorized. The schema is described like this: type Advert @model @auth(rules: [{ allow: owner }, { allow: public, operations: [read] }]) { ... } But somehow this is not working. I just get following error: errorType: "Unauthorized", message: "Not Authorized to access createAdvert on type Advert"

However, if I try it via the AppSync Webconsole it is working. Must I configure something in the Amplify API Client?

Best regards Alex

  • Are you getting Unauthorized when testing locally using mock, or in the web-application when connecting to the API endpoint?

Keine Antworten

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