Skip to content

Instantly share code, notes, and snippets.

@pavelanni
Created January 31, 2018 18:47
Show Gist options
  • Save pavelanni/f681dd8df6b22563f76a60200788f4ad to your computer and use it in GitHub Desktop.
Save pavelanni/f681dd8df6b22563f76a60200788f4ad to your computer and use it in GitHub Desktop.
DynamoDB field types
import boto3
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table("users")
response = table.get_item()
response = table.get_item(Key={
'user_id': 'REDACTED',
'user_name': 'John'
})
for k in response['Item'].keys():
print(type(response['Item'][k]))
for k in response['Item']['user_state'].keys():
print(type(response['Item']['user_state'][k]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment