Created
July 5, 2018 15:55
-
-
Save daniel-woods/ca704fdf3b04dea30a3154a69ff9c1aa to your computer and use it in GitHub Desktop.
Generates a bunch of "create_platform_endpoint" calls with fake Device Tokens.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # Script to generate fake endpoints for a platform application. | |
| import boto3 | |
| import time | |
| sns = boto3.client("sns") | |
| platform_application = "YOUR_SNS_APPLICATION_PLATFORM_ARN" | |
| number_of_endpoints = 150321 | |
| i = 0 | |
| while True: | |
| response = sns.create_platform_endpoint( | |
| PlatformApplicationArn=platform_application, | |
| Token="FAKE_" + str(i)) | |
| if i >= number_of_endpoints: | |
| break | |
| else: | |
| i+=1 | |
| print("Completed.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment