- Newest
- Most votes
- Most comments
Hello chndev, thank you for reaching out! It seems like you’re trying to set up some AppSync queries for unauthenticated users.
Do you think you can share your policy attached to your Unauthenticated users role. The error “Not Authorized” suggests that the role does not have sufficient permission but we can find out after taking a closer look at your IAM role permissions.
For a full guide on setting up AppSync for unauthenticated users you could follow these steps:
-
Set the primary authorization mode for your schema to use IAM
- Under “Default authorization mode” set API-level to “AWS Identity and Access Management”
-
Verify your created Cognito Identity pool with Unauthenticated users enabled has the proper IAM role permissions. For reference here is documentation:
-
Verify the Amplify SDK configuration for your desired purpose.
Since you mentionned using Cognito user pool, another possibility is to: 1- Use the cognito authorization type by following these steps here: https://docs.aws.amazon.com/appsync/latest/devguide/security-authz.html#amazon-cognito-user-pools-authorization 2- Import your existing identity pool following these steps: https://docs.amplify.aws/cli/auth/import/#import-an-existing-identity-pool
Hint: This guide should help you figure out how to integrate your existing Amazon Cognito user pool and federated identities (identity pool) into an Amplify project via the Amplify Admin UI: https://aws.amazon.com/blogs/mobile/import-existing-amazon-cognito-resources-with-amplify-admin-ui/
Relevant content
- Accepted Answerasked a year ago
- asked 2 years ago
- asked 3 years ago
- Accepted Answerasked 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago