Created
May 1, 2018 02:52
-
-
Save jprichards/479c143e098636799913b571d6a13533 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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