Skip to content

Instantly share code, notes, and snippets.

@mxro
Created June 17, 2022 23:37
Show Gist options
  • Select an option

  • Save mxro/1ed7e12394f0ab18f66640f35f6c24e6 to your computer and use it in GitHub Desktop.

Select an option

Save mxro/1ed7e12394f0ab18f66640f35f6c24e6 to your computer and use it in GitHub Desktop.
const res = client
.createTable({
TableName: tableName,
AttributeDefinitions: [
{
AttributeName: 'pk',
AttributeType: 'S',
},
{
AttributeName: 'sk',
AttributeType: 'S',
},
],
KeySchema: [
{
AttributeName: 'pk',
KeyType: 'HASH',
},
{
AttributeName: 'sk',
KeyType: 'RANGE',
},
],
BillingMode: 'PAY_PER_REQUEST',
})
.promise();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment