Unauthorized running AppSync Query

0

I have a GraphQL Schema set on an AWS AppSync API. In the Schema view I can see my schema and query, but when I run the query from the query view I am getting the following where uploadFile is the query I am attempting to run.

{ "data": { "uploadFile": null }, "errors": [ { "path": [ "uploadFile" ], "data": null, "errorType": "Unauthorized", "errorInfo": null, "locations": [ { "line": 2, "column": 3, "sourceName": null } ], "message": "Not Authorized to access uploadFile on type Query" } ]

asked 7 months ago364 views
1 Answer
1
Accepted Answer

Issue:

This issue indicate that the client is not authorized to access the uploadFile query on the AWS AppSync API, likely due to a mismatch between the configured authentication mode and the credentials provided or insufficient permissions set for the accessing entity.

Possible solution:

To resolve the issue, verify and align the authentication mode used by your client with the one configured for your AWS AppSync API, and ensure the entity making the request has the appropriate permissions to access the uploadFile query.

For detailed instructions on how to set up access for the uploadFile query in your AWS AppSync API using AWS IAM, check out the friendly guide in the AWS AppSync Developer Guide.

profile picture
EXPERT
answered 7 months ago
profile picture
EXPERT
reviewed 3 months ago
  • I am facing a similar error: Error fetching photos: { "data": { "listPhotos": null }, "errors": [ { "path": [ "listPhotos" ], "data": null, "errorType": "Unauthorized", "errorInfo": null, "locations": [ { "line": 2, "column": 3, "sourceName": null } ], "message": "Not Authorized to access listPhotos on type Query" } ] } Can you help me debug this as I am quite confused as I have tried my best

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