One minute
Batch Delete DynamoDB Items
import boto3
from boto3.dynamodb.conditions import Key, Attr
dynamodb = boto3.resource('dynamodb', region_name='us-east-1')
table = dynamodb.Table('test_table')
scan = table.query(
KeyConditionExpression=Key('schema_col').eq('col value')
)
with table.batch_writer() as batch:
for item in scan['Items']:
batch.delete_item(Key={'schema_col': item['schema_col'], 'schema_col_two': item['schema_col_two']})