Last active
March 11, 2017 02:53
-
-
Save brianpursley/5fedab9e4b6e676b86ca7edc62d97685 to your computer and use it in GitHub Desktop.
AWS Lambda function that publishes to SNS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var AWS = require("aws-sdk"); | |
exports.handler = (event, context, callback) => { | |
var sns = new AWS.SNS(); | |
sns.publish({ | |
Message: 'YOUR MESSAGE HERE', | |
Subject: 'YOUR SUBJECT HERE', | |
TopicArn: 'YOUR SNS TOPIC ARN HERE' | |
}, function() { | |
callback(null, { | |
'statusCode': 200, | |
'headers': {}, | |
'body': null | |
}); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment