Install Node
AWS account
import 'bootstrap/dist/css/bootstrap.min.css';
var AWS = require('aws-sdk');
exports.handler = (event, context, callback) => {
var sns = new AWS.SNS();
var params = {
Message: event.message,
MessageStructure: 'string',
PhoneNumber: event.number,
Subject: event.subject
};
sns.publish(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
};
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ListObjectsInBucket",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::YOUR-BUCKET-NAME/*"
}
]
}