Skip to content

Instantly share code, notes, and snippets.

@sagar-gavhane
Created May 28, 2019 09:10
Show Gist options
  • Save sagar-gavhane/e19d9914d255771e4a4feeff244ae429 to your computer and use it in GitHub Desktop.
Save sagar-gavhane/e19d9914d255771e4a4feeff244ae429 to your computer and use it in GitHub Desktop.
create dynamo db
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