User is not authorized to access this resource

lambda
api-gateway
dynamodb

#1

i have this config on my serverless.yml file which i’ve been using on my other projects and working

iamRoleStatements:
    - Effect: Allow
      Action:
        - dynamodb:Query
        - dynamodb:Scan
        - dynamodb:*Item
      Resource: "arn:aws:dynamodb:ap-southeast-2:<account>:table/PB*"

i even tried this yml format:

iamRoleStatements:
    - Effect: Allow
      Action:
        - dynamodb:Query
        - dynamodb:Scan
        - dynamodb:GetItem
        - dynamodb:PutItem
        - dynamodb:UpdateItem
        - dynamodb:DeleteItem
      Resource: "arn:aws:dynamodb:ap-southeast-2:<account>:table/PB*"

but still get this error:

{
    "Message": "User is not authorized to access this resource"
}