'How to delete all items the table in a Dynamodb

I tried to delete all items using the PartiQL in AWS, but i receive that message

delete from myfile


An error occurred during the execution of the command.
ValidationException: Where clause does not contain a mandatory equality on all key attributes

enter image description here



Solution 1:[1]

I've got this error when I queried the filters with double quotes ("), but they are single quotes (') even though the fields themselves are double quotes.

Here's the WRONG way (the one i've got the same error as you):

DELETE FROM "TABLE_A" WHERE "PK" = "<PK_A>" AND "SK" < "2022-03-27T14:10:00.000Z"

Here's the RIGHT way(at least the way it worked for me):

DELETE FROM "TABLE_A" WHERE "PK" = '<PK_A>' AND "SK" < '2022-03-27T14:10:00.000Z'

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Marco Barcellos