Created
May 24, 2021 11:08
-
-
Save vikasbajaj/99a8de0a094431ff8317c02ad5fe5516 to your computer and use it in GitHub Desktop.
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/python3 | |
import requests | |
import datetime | |
import time | |
import threading | |
import random | |
# replace URL string with Invoke URL (APIGW V2 --> Invoke URL) | |
url = "https://xxxxxxxxxxxxxxxxxxxxxxxxx.amazonaws.com/beta" | |
for i in range(10000): | |
# generating a random partition key for Kinesis Data Stream. | |
partition_key = "partition-{0}".format(random.randint(1, 1000)) | |
# building payload with "data" and "id" (partition key) | |
myobj = {"data": "message from pixel", "id": partition_key} | |
#time.sleep(1) | |
x = requests.post(url, json = myobj) | |
print(x.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Test client to send data to APIGW which further sends data to KDS ===> KDF ====> S3