GetItem.py 255 B

12345678910111213
  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.get_item(
  7. TableName = TABLE_NAME,
  8. Key = {'id': {'N': '5'}})
  9. print(json.dumps(response['Item'], indent=4))