How to set TTL attribute on SNS post method in NodeJS?

I am writing code to send OTP message. My current options and publish method looks like this:

params = {
  Message: otpMessage,
  MessageStructure: 'string',
  PhoneNumber: contactNo
};

sns.publish(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else console.log(data);           // successful response
});

      

How do I set the TTL attribute?

+3


source to share





All Articles