Skip to content

ArchTaqi/sns-reminders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

SMS reminders Using Amazon SNS

Getting Started

  1. If you haven't already, you'll want to sign up for AWS and SNS.
  2. Head over to your IAM console, add a user called "sns-reminders", with "Programmatic access" is checked, attaching the policy AmazonSNSFullAccess and get the Access key ID and Secret access key.
  3. Create a new topic with {'name':'sns-reminders', 'Display Name':'REMINDERS'} and then subscribe your mobile number to that topic. Get the topic details "Topic ARN" and "Region".
  4. create a credentials file at ~/.aws/ and chmod 600 credentials, and then you can copy and paste the aws_access_key_id and aws_secret_access_key to replace their placeholders in your ~/.aws/credentials file.
[sns-reminders]
aws_access_key_id = YOUR_AWS_ACCESS_KEY_ID
aws_secret_access_key = YOUR_AWS_SECRET_ACCESS_KEY
  1. Now let's send our first message! Open the project folder in your command line and type the following command:
    $ php send.php "Walk your dogs now!"
  1. Cron Your Way to Good Habits
    $ crontab -e
     0  10  *   *   *   php ~/sns-reminders/send.php "Walk your dogs now!" >> ~/sns-reminders/cron.log 2>&1

Source

About

Using Amazon SNS to build daily SMS reminders

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages