Back
Close

Computing with Data

elgeish
33.4K views

Amazon DynamoDB - Part II

To get that item we just created, we simply can query for it:

from pprint import pprint

import boto3

dynamodb = boto3.resource('dynamodb')
response = dynamodb.Table('reminder').get_item(
  Key={
  'timestamp': 1511643670,
  'userID': 'geish@voicera.ai',
  }
)
pprint(response['Item'])
## {u'text': u'write a DynamoDB example',
##   u'timestamp': Decimal('1511643670'),
##   u'ttl': Decimal('1511730070'),
##   u'userID': u'geish@voicera.ai'}
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants