DeleteItem.py 295 B

123456789101112131415
  1. #!/usr/bin/env python
  2. import boto3
  3. import json
  4. TABLE_NAME='elaborate_employee_table'
  5. client = boto3.client('dynamodb')
  6. response = client.delete_item(
  7. TableName = TABLE_NAME,
  8. Key = {'id': {'N': '5'}},
  9. ReturnValues = 'ALL_OLD'
  10. )
  11. print(json.dumps(response['Attributes'], indent=4))