Last active
April 9, 2018 12:31
-
-
Save ctwoprod/b1e10c865a2a32076bcc44357b19c1a5 to your computer and use it in GitHub Desktop.
Revisions
-
ctwoprod renamed this gist
Apr 9, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
ctwoprod revised this gist
Apr 9, 2018 . 1 changed file with 22 additions and 19 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,30 +1,33 @@ #!/usr/bin/python import boto3 import json # Create SQS client sqs = boto3.client('sqs',region_name='ap-southeast-1') queue_url = 'https://sqs.ap-southeast-1.amazonaws.com/862498237182/test-paywalletusercreate-sqs' username = 'suername' profile_name = 'yf' parent_id = '2j' merchant_id = '56' account_id = 't3' email = 'x11' phone = 'f112' # Send message to SQS queue body = {"username": username, "profileName": profile_name, "parentId": parent_id, "merchantId": merchant_id, "userId": account_id, "email": email, "phoneNumber": phone } response = sqs.send_message( QueueUrl=queue_url, DelaySeconds=10, MessageBody=json.dumps(body) ) print(response['MessageId']) -
ctwoprod revised this gist
Apr 8, 2018 . 1 changed file with 38 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ #!/usr/bin/python import boto3 # Create SQS client sqs = boto3.client('sqs',region_name='ap-southeast-1') queue_url = 'https://sqs.ap-southeast-1.amazonaws.com/862498237182/test-paywalletuser-sqs' # Send message to SQS queue response = sqs.send_message( QueueUrl=queue_url, DelaySeconds=10, MessageAttributes={ 'Title': { 'DataType': 'String', 'StringValue': 'The Whistler' }, 'Author': { 'DataType': 'String', 'StringValue': 'John Grisham' } }, MessageBody=( '{' '"username" : "ctw",' '"profileName" : "PF",' '"parentId":"4",' '"merchantId" : "2",' '"userId": "1",' '"email": "hxxhhrra",' '"phoneNumber" : "01910"' '}' ) ) print(response['MessageId']) -
ctwoprod created this gist
Apr 6, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ !/usr/bin/python import boto3 # Create SQS client sqs = boto3.client('sqs',region_name='ap-southeast-1') queue_url = 'https://sqs.ap-southeast-1.amazonaws.com/xxx/test-sqs' # Send message to SQS queue response = sqs.send_message( QueueUrl=queue_url, DelaySeconds=10, MessageAttributes={ 'Title': { 'DataType': 'String', 'StringValue': 'The Whistler' }, 'Author': { 'DataType': 'String', 'StringValue': 'John Grisham' } }, MessageBody=( 'Information about current NY Times fiction bestseller for ' 'week of 12/11/2016.' ) ) print(response['MessageId'])