Skip to content

Instantly share code, notes, and snippets.

@chocksaway
Created March 4, 2016 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chocksaway/958d49abfb02703b6a6d to your computer and use it in GitHub Desktop.
Save chocksaway/958d49abfb02703b6a6d to your computer and use it in GitHub Desktop.
Python dynamo-db boto3
import boto3
from boto3.dynamodb.conditions import Key, Attr
TABLE_NAME = 'int-mobileSubscriptionsTable'
dynamo_db = boto3.resource('dynamodb', endpoint_url='http://localhost:8090', region_name='us-east-1')
table = dynamo_db.Table(TABLE_NAME)
response = table.query(
KeyConditionExpression=Key('endpoint').eq('endpoint1')
)
for i in response['Items']:
print(i['endpoint'])
print(i['topicURN'])
print(i['bbcUserId'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment