ScanTable.py 326 B

12345678910111213141516
  1. #!/usr/bin/env python
  2. import boto3
  3. import json
  4. TABLE_NAME='elaborate_employee_table'
  5. INDEX_NAME='scan_index'
  6. client = boto3.client('dynamodb')
  7. response = client.scan(
  8. TableName = TABLE_NAME,
  9. IndexName = INDEX_NAME,
  10. ReturnConsumedCapacity = 'INDEXES'
  11. )
  12. print(json.dumps(response['ConsumedCapacity'], indent=4))