AWS workshop at TTN Conference

I attended the AWS workshop but my AWS account was not live so could not participate. I am trying it out at home and have progressed very well but I am stuck on the Lambda function.

In the code I have to fill in the topic ARN. I have used this below:

var topicArn = “aws:sns:eu-west-2:796225616835:Verfacil_Node_1_alarm_notification”;

Does this look correct or should it just be

var topicArn = “aws:sns:eu-west-2:796225616835”

Everything else up to this point has worked well!

Full Lambda code:

console.log(‘Loading function’);

// FILL IN YOUR SNS TOPIC ARN HERE
var topicArn = “aws:sns:eu-west-2:796225616835:Verfacil_Node_1_alarm_notification”;

var AWS = require(‘aws-sdk’);
AWS.config.region = ‘eu-west-2’;

exports.handler = function(event, context) {
var sns = new AWS.SNS();

let ttnMessage = event;
let ttnEvent = ttnMessage.payload_fields.event;

if(ttnEvent == "button" ) {
    sns.publish({
        Message: 'A burglar was detected at your doorstep',
        TopicArn: topicArn
    }, function(err, data) {
        if (err) {
            console.log(err.stack);
            return;
        }
        console.log('alarm notification send');
        console.log(data);
        context.done(null, 'Function Finished!');
    });
}

};