Sometimes a push notification needs to be edited after being sent.
Is there a way to remove (undo, delete, void) or edit (update, change) an unread push notification after publishing it through AWS SNS?
I'm using the AWS JavaScript SDK to send push notifications from our node backend server:
const aws = require('aws-sdk');
const sns = new aws.SNS();
...
// Apple iOS Push Notifications
sns.publish({
Message: JSON.stringify({
default: message,
APNS: apnsPayload,
APNS_SANDBOX: apnsPayload,
}),
TargetArn: this.apnsSnsArn,
MessageStructure: 'json',
}).promise().catch(err => console.log(err));
// Android Push Notifications
sns.publish({
Message: JSON.stringify({
default: message,
GCM: JSON.stringify({
data: { title, message, data },
}),
}),
TargetArn: this.fcmSnsArn,
MessageStructure: 'json',
}).promise().catch(err => console.log(err));