Error "Invalid FilterExpression: Incorrect operand type for operator or function; operator or function: BETWEEN, operand type: M"

Hi dear,
I have this error:

  • error:"Invalid FilterExpression: Incorrect operand type for operator or function; operator or function: BETWEEN, operand type: M"

My code is this

{
    "TableName": "OnlyData",
    "FilterExpression": "#timestampAttr BETWEEN :startDate AND :endDate",
    "ExpressionAttributeNames": {
        "#timestampAttr": "Timestamp"
    },
    "ExpressionAttributeValues": {
        ":startDate": {"S": "2024-01-01T00:00:00Z"},
        ":endDate": {"S": "2024-02-01T00:00:00Z"}
    },
    "Select": "ALL_ATTRIBUTES"
}

I need to see the data from my Dynamodb table in AWS by selecting all the records using the filter on the Timest key which would be the timestamp.

The database connects correctly, I see all the tables but if I run this query I always get an error.