Created
May 28, 2019 09:10
-
-
Save sagar-gavhane/e19d9914d255771e4a4feeff244ae429 to your computer and use it in GitHub Desktop.
create dynamo db
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
const create_db = (dynamodb) => { | |
const params = { | |
TableName: 'feeds-subscriptions', | |
KeySchema: [ | |
{ AttributeName: 'id', KeyType: 'HASH' }, | |
], | |
AttributeDefinitions: [ | |
{ AttributeName: 'id', AttributeType: 'S' }, | |
], | |
ProvisionedThroughput: { | |
ReadCapacityUnits: 20, | |
WriteCapacityUnits: 4, | |
}, | |
}; | |
dynamodb.createTable(params, (err, data) => { | |
if (err) { | |
console.log(err); | |
} else { | |
console.log(data); | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment