I am using docker enabled dynamoDB local as mentioned here
and following is my JS code:
AWS.config.update({
region: 'sas',
endpoint: 'http://docker.for.mac.host.internal:8000' //'http://localhost:8000'
});
and create table function below:
function createTable() {
let params = {
TableName: 'sas',
KeySchema: [{
AttributeName: 'title',
KeyType: 'HASH',
}],
AttributeDefinitions: [{
AttributeName: 'title',
AttributeType: 'S'
}],
ProvisionedThroughput: {
ReadCapacityUnits: 1,
WriteCapacityUnits: 1,
}
};
dynamoDB.createTable(params, function(err, data) {
if (err)
console.log(err); // an error occurred
else
console.log(data);
});
}
i could see created table sas using cli :
aws dynamodb list-tables --endpoint-url http://localhost:8000 --region=sas
but NOT listing the table in the and it's always empty.
http://localhost:8000/shell/
any idea's?
NOTE: i can see my table with above code, by running dynamodb jar locally
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb