Emma
Emma

Reputation: 19

using AWS SNS to send SMS

For one of my clients I have AWS SNS set up for Push Notifications to IOS and Android devices. Another client wants SMS messages to phone numbers. I see that AWS SNS supports sending SMS messages, this new client only has an AWS account they don't have an Apple account or Google account. So ...

Do I need to create applications with the endpoints for those two services to send SMS messages? Which means setting up the Apple Accounts and Google Accounts? How does AWS know which provider to send the SMS message to? With SNS sends I had the device ID from the mobile app to identify the type.

Sorry if I am rambling but I appreciate any insight on this.

Upvotes: 0

Views: 3106

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269081

If you simply want to send SMS messages, you can do it directly from Amazon SNS.

Here is an example using the AWS Command-Line Interface (CLI):

aws sns publish --phone-number +61123456789 --message 'Success!'

The phone number is in international format, starting with the country code.

See: SNS publish — AWS CLI 1.15.12 Command Reference

You can also send it programmatically by using an SDK for programming languages.

Upvotes: 3

Related Questions