IamCalvinBrown.com a Blog Site

Code Examples, Consulting Advice and lots of other cool things

Send a text message (SMS) using Amazon SNS

(This assumes you've already setup the topic and have your own Topic ARN)

using Amazon.SimpleNotificationService;

using Amazon.SimpleNotificationService.Model;

// be sure this is the region you're choosing

AmazonSimpleNotificationServiceClient client = new AmazonSimpleNotificationServiceClient(Amazon.RegionEndpoint.USEast1);

// Publish a message to an Amazon SNS topic.

PublishRequest publishRequest = new PublishRequest("arn:aws:sns:us-east-1:123456:TESTTOPIC","this is the message");

var publishResponse = await client.PublishAsync(publishRequest);

Comments (1) -