Created
October 30, 2019 22:15
-
-
Save andredtr/fcb1a694a9944ba30374c2f7182e77f6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var params = { | |
| TableName: 'tableName', | |
| KeySchema: [ // The type of of schema. Must start with a HASH type, with an optional second RANGE. | |
| { // Required HASH type attribute | |
| AttributeName: 'id', | |
| KeyType: 'HASH', | |
| } | |
| ], | |
| AttributeDefinitions: [ // The names and types of all primary and index key attributes only | |
| { | |
| AttributeName: 'id', | |
| AttributeType: 'S', | |
| }, | |
| ], | |
| ProvisionedThroughput: { // required provisioned throughput for the table | |
| ReadCapacityUnits: 5, | |
| WriteCapacityUnits: 5, | |
| } | |
| }; | |
| dynamodb.createTable(params, function(err, data) { | |
| if (err) ppJson(err); // an error occurred | |
| else ppJson(data); // successful response | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment