Hi all,
I want to publish to an SNS queue using a Post Registration action.
From the looks of it the built in SNS integration only works for SMS so I believe I have to build a custom post registration action.
My current action looks like this
exports.onExecutePostUserRegistration = async (event) => {
// Load the AWS SDK for Node.js
// Set region
var AWS = require("aws-sdk");
AWS.config.update({region: 'us-east-1'});
var awsSNS = new AWS.SNS({
credentials: new AWS.Credentials("ACCESS_ID", "ACCESS_SECRET")
});
var params = { Message: JSON.stringify("fromAUth0"), TopicArn: "MY_TOPIC_ARN"};
awsSNS.publish(params);
}
When I run this (with my key/secret/arn filled in) I get a 200 response, but I don’t see any results from my lambda (which is subscribed to my SNS) or evidence it was called. Am I missing a step? Is there some easier way to do this?