Created
November 27, 2018 12:57
-
-
Save aa2kb/e842147829b774110f9bcdbf9d57e94d to your computer and use it in GitHub Desktop.
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 = async (event) => { | |
try { | |
var snsParameters = { | |
TopicArn: process.env.SNS_TOPIC, | |
Message: JSON.stringify(event,null,2) | |
}; | |
return await new AWS.SNS({ apiVersion: '2010-03-31' }).publish(snsParameters).promise(); | |
} | |
catch (e) { | |
throw(e); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment