Skip to content

Instantly share code, notes, and snippets.

@daniel-woods
Created July 5, 2018 15:55
Show Gist options
  • Save daniel-woods/ca704fdf3b04dea30a3154a69ff9c1aa to your computer and use it in GitHub Desktop.
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.
#!/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