If you have DynamoDB table 'Test' as follows:

To fetch all items with attribute 'Name', use the following code:
from __future__ import print_function # Python 2/3 compatibility
import boto3
import json
import decimal
# Helper class to convert a DynamoDB item to JSON.
class DecimalEncoder(json.JSONEncoder):
def default(self, o):
if isinstance(o, decimal.Decimal):
if o % 1 > 0:
return float(o)
else:
return int(o)
return super(DecimalEncoder, self).default(o)
# us-east-1 is the region name here
dynamodb = boto3.resource('dynamodb', 'us-east-1')
# Test is the table name here
table = dynamodb.Table('Test')
# Table scan
response = table.scan()
for i in response['Items']:
# get all the table entries in json format
json_str = json.dumps(i, cls=DecimalEncoder)
#using json.loads will turn your data into a python dictionary
resp_dict = json.loads(json_str)
# Getting particular column entries
# will return None if 'Name' doesn't exist
print (resp_dict.get('Name'))
Sample output:
