Skip to content

Instantly share code, notes, and snippets.

@bq1990
Created January 30, 2020 20:25
Show Gist options
  • Save bq1990/c83388d4856ee9eb2e5cad0d506745c4 to your computer and use it in GitHub Desktop.
Save bq1990/c83388d4856ee9eb2e5cad0d506745c4 to your computer and use it in GitHub Desktop.
from decimal import Decimal
import sys
import time
import boto3
from boto3.dynamodb.conditions import Key
session = boto3.Session(profile_name='anil')
client = session.resource('dynamodb')
if len(sys.argv) != 2:
print('wrong number of args')
exit(0)
device_id = sys.argv[1]
vends_tbl = client.Table('%s_vends' % device_id)
vends = vends_tbl.query(
KeyConditionExpression=Key('product').eq('bag'),
)
print(vends)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment