Skip to content

Instantly share code, notes, and snippets.

@brianleroux
Created December 11, 2019 19:56
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 brianleroux/1c9123cc8da9db65c62285dba5736c62 to your computer and use it in GitHub Desktop.
Save brianleroux/1c9123cc8da9db65c62285dba5736c62 to your computer and use it in GitHub Desktop.
let aws = require('aws-sdk')
let region = 'us-west-1'
let db = new aws.DynamoDB.DocumentClient({region})
db.query({
TableName: 'begin-production-builds',
IndexName: 'begin-production-builds-appID_env-ts-index',
KeyConditionExpression: '#appID_env = :appID_env',
ExpressionAttributeNames: {
'#appID_env': 'appID_env'
},
ExpressionAttributeValues: {
':appID_env': process.env.ID
},
Limit: 10,
ExclusiveStartKey: {
appID_env: '',
ts: '',
buildID: ''
}
}, console.log)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment