Skip to content

Instantly share code, notes, and snippets.

@edwint88
Created November 23, 2021 23:20
Show Gist options
  • Save edwint88/0fadef69555b62a613bc16a766dff44c to your computer and use it in GitHub Desktop.
Save edwint88/0fadef69555b62a613bc16a766dff44c to your computer and use it in GitHub Desktop.
aws dynamodb scan --table-name $TABLE_NAME --attributes-to-get "$KEY" \
--query "Items[].$KEY.S" --output text | \
tr "\t" "\n" | \
xargs -t -I keyvalue aws dynamodb delete-item --table-name $TABLE_NAME \
--key "{\"$KEY\": {\"S\": \"keyvalue\"}}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment