Skip to content

bilal/masspn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

A command-line utility for send mass push notifications to all registered users of an SNS platform application.

Setup:

Boto Config:

Set your credentials in ~/.boto. Create the file if it dose not exist

[Credentials]
aws_access_key_id = <your access key>
aws_secret_access_key = <your secret key>
	
[Boto]
debug = 0
num_retries = 5

Step 1: Fetch all user arns and write them to file:

Usage: fetch_user_arns.py [-v] [-a sns_app_arn] [-g region] [-o output_file]

Region examples: us-east-1, us-west-2 etc

The output format:

arn,enabled

Note that fetching all registered arns cannot be parallelized and so would take quite a bit of time for large number of users.

Step 2: Send push notifications to all users

Usage: masspn.py [-v] [--dry-run] [-a arns_file] [-g region] [-m message] [-s message-structure] [-n num_processes] 

Message structure must either be text or json

By default, masspn.py uses 5 processes. Specify the --dry-run option to process the entire file and make sure everything works but not send the actual notification. The script writes the output to arns_file.out.[success|failures|disabled] files, indicating the result for each arn.

About

A command line utility for sending mass push notifications using Amazon SNS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages