Skip to content

Instantly share code, notes, and snippets.

@mholmes-hs
Created May 28, 2020 15:38
Show Gist options
  • Save mholmes-hs/dab66ae7d84a0c0bdbffdba59309b8b0 to your computer and use it in GitHub Desktop.
Save mholmes-hs/dab66ae7d84a0c0bdbffdba59309b8b0 to your computer and use it in GitHub Desktop.
Delete item from DynamoDB
import boto3
from boto3.dynamodb.conditions import Key
def delete_user():
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('Users')
response = table.delete_item(
Key={
'id': 1,
},
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment