javascript – Amplify GraphQL query returns ‘AccessDeniedException’ error while trying to retrieve data from an AWS database

I have an issue with creadential. I create project and graphQL database.
type FAQ @model @auth(rules: [{allow: public}]) { id: ID! answer: String! question: String! }

After I tried to get all the FAQs.
import { API, graphqlOperation } from 'aws-amplify'; import { listFAQS } from '../../../graphql/queries'; const faqs = await API.graphql(graphqlOperation(listFAQS));

But got the error
enter image description here
I am a newbee in AWS development. Please help me.

I tried to get data from AWS Database

Read more here: Source link