Skip to content

Instantly share code, notes, and snippets.

@jprichards
Created May 1, 2018 02:52
Show Gist options
  • Save jprichards/479c143e098636799913b571d6a13533 to your computer and use it in GitHub Desktop.
Save jprichards/479c143e098636799913b571d6a13533 to your computer and use it in GitHub Desktop.
import boto3
dbclient = boto3.client('dynamodb')
def checkdb(build=None, pid=None):
if build is not None and pid is not None:
r = dbclient.scan(TableName='osbuilds',
FilterExpression=
'build = :build and productid = :pid',
ExpressionAttributeValues={
':build':{'S':build},
':pid':{'S':pid}
})
return r['Count']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment