Create Amazon SQS Queues

Hydroid
1 min readApr 16, 2022

To create Amazon SQS Queues using Python.

This guide assumes that you already know what is Amazon SQS. For more info visit this link.

We will be setting up FIFO queue. FIFO queue follow First-In-First-Out rule and has only one copy of each message. Message in FIFO queues are distinguished based on MessageGroupId and De-DuplicationId.

Dead-Letter Queues: Amazon SQS supports dead-letter queues (DLQ), which other queues (source queues) can target for messages that can’t be processed (consumed) successfully.

Create SQS Queues:

We need boto3 dependency to connect with AWS queue using python. Add the queue name in variable QUEUE_LIST that you want to create. The redrive_policy is used to setup DLQ after maxReceiveCount the message is moved from the main FIFO queue to the DLQ.

Note: The main queue and DLQ queue should be of same type i.e if main queue is of type FIFO then DLQ must be of type FIFO.

If you like my story or it helped you. You can buy me a coffee:

--

--

Hydroid

Currently working as a Full Stack Developer in India