#!/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'])