1)Create a table : const createTableParams = { TableName: 'Orders', KeySchema: [ { AttributeName: 'orderId', KeyType: 'HASH' }, // Partition key { AttributeName: 'orderTimestamp', KeyType: 'RANGE' } // Sort key ], AttributeDefinitions: [ { AttributeName: 'orderId', AttributeType: 'S' }, { AttributeName: 'orderTimestamp', AttributeType: 'S' }, { AttributeName: 'customerId', AttributeType: 'S' }, // Attribute for GSI { AttributeName: 'status', AttributeType: 'S' } // Attribute for GSI ], ProvisionedThroughput: { ReadCapacityUnits: 5, WriteCapacityUnits: 5 }, GlobalSecondaryIndexes: [ { IndexName: 'CustomerIdIndex', KeySchema: [ { AttributeName: 'customerId', KeyType: 'HASH' }, { AttributeName: 'orderTimestamp', Ke...
This website contains interview questions for JavaScript, Nodejs, Html, Css, Datastructure, Mongodb, Angular, Aws and much more intresting articles on different technologies.