Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const AWS = require('aws-sdk');
- const sns = new AWS.SNS({ region: 'REGION', apiVersion: '2015-03-31' });
- const params = {
- Message: 'STRING_VALUE',
- MessageAttributes: {
- Url: { DataType: 'String', StringValue: 'STRING_VALUE' },
- Keys: { DataType: 'String', StringValue: 'STRING_VALUE' },
- },
- MessageStructure: 'STRING_VALUE',
- Subject: 'STRING_VALUE',
- TopicArn: 'TOPICARN',
- };
- sns.publish(params, (err, data) => {
- if (err) console.log(err, err.stack); // an error occurred
- else console.log(data); // successful response
- });
Add Comment
Please, Sign In to add comment