April 2018
Intermediate to advanced
280 pages
8h 37m
English
First, create an object of type sqs and then invoke the create_queue() function to create an SQS queue. The response object is a Python dictionary that can then be used to fetch the URL of the queue.
The following Python program creates a queue and fetches the URL of the newly created queue:
import boto3# Create SQS clientsqs_object = boto3.client('sqs')response = sqs_object.create_queue( QueueName='packtpub_queue',)queue_url = response['QueueUrl']
Once the queue is created, let's send a message to it.