Is there a way to disable a Dynamodb stream using aws sdk javascript?
I need to stop streaming data to my lambda function while I'm doing some maintenance to other services.
Is there a way to disable a Dynamodb stream using aws sdk javascript?
I need to stop streaming data to my lambda function while I'm doing some maintenance to other services.
You can use updateTable
API to disable the stream specification.
var dynamodb = new AWS.DynamoDB();
var params = {
TableName: 'yourTableName',
StreamSpecification: {
StreamEnabled: true
}
};
dynamodb.updateTable(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Note:-
I have not tested it as I don't have Streams on my table. However, the above code should work.