1

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.

2
  • Do you want the solution on Javascript only or is it ok to provide solution on AWS management console ? Commented Aug 4, 2017 at 9:13
  • I would like to know the solution on Javascript if it's possible. In the management console I already know where I can disable the stream. Commented Aug 4, 2017 at 9:16

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.