Created
April 28, 2023 14:40
-
-
Save atemate/8f17b5a0a3532b1d599734f49befd2e0 to your computer and use it in GitHub Desktop.
Delete all DymamoDB items
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
table="..." | |
for pk in $(aws dynamodb scan --table-name ${table} | jq -r '.Items | .[].pk.S'); do | |
aws_cli dynamodb delete-item --table-name "${table}" --key '{"pk":{"S":"'$pk'"}}' & | |
sleep 0.01 | |
echo "Deleted: $table / $pk" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment