SNS to AWS Lambda Trigger - Part 1

preview_player
Показать описание
Trigger that will invoke AWS lambda when a message is published to SNS and then write that message to dynamodb
Рекомендации по теме
Комментарии
Автор

Please put a link to part 2 in the description. Great video.

RichardBronosky
Автор

can you do this problem on the latest AWS? which test event you use after finish your code in lambda?

zehuazhao
Автор

Hi Arpan,
Nice video, can we send sms notifications like OTP to mobiles in India through SNS. Please explain complete procedure..

maheshkusumuru
Автор

There should be a semi-colon after "const AWS = require('aws-sdk')" like as follows:
const AWS = require('aws-sdk');

ananthpeddi
Автор

const AWS = require('aws-sdk');
const DocClient = new


console.log('Loading function');


exports.handler = async (event, context, callback) => {
//console.log('Received event:', JSON.stringify(event, null, 2));
var params = {
Item: {
messageid:event.Records[0].Sns.MessageId,

},
TableName:'Message'
};
docClient.put(params, function(err, data){
if(err){
callback(err, null);
}
else{
callback(null, data);
}
});
}

adityajain