Create New SQS Queue

AWS SQS is a managed message queuing service in the cloud which makes it easy to decouple micro services and can be part of a serverless architecure. The logical container that is used to hold the messages is called the "Queue". A queue can be created from the AWS console and also from the cli.

To create a queue, login to the console and click "Create SQS Queue"

The options that can be configured while creating the queue are as follows.

  • Queue Name: name of queue - it can be up to 80 characters and contain alphanumeric characters, underscores(_) and dashes(-).
  • Region: where the queue will be created. It can be altered from this screen but can be changed by choosing a different region and then creating a queue.
  • Default Visibility Timeout: the length of time (in seconds) that a message received from a queue will be invisible to other receiving components. Max time can be 12 hours.
  • Message Retention Period: the length of time SQS will retain a message if it does not get deleted. Maximum time can be set to 14 days.
  • Maximum Message Size: Size can be between 1 and 256 KB. SQS is priced at 64 KB block.
  • Delivery Delay: the length of time to delay the first delivery of all messages added to this queue. It can be set to a max of 15 minutes.
  • Receive Message Wait Time: The maximum amount of time that a long polling receive call will wait for a message to become available before returning an empty response. It can be set to a max of 20 seconds.
  • Use Redrive Policy: enable sending messages to a dead letter queue after exceeding the maximum receives.
  • Dead Letter Queue: the name of queue to send messages
  • Maximum Receives: the maximum number of times a message can be received before it is sent to the Dead Letter Queue.

Once the above parameters have been set or the default values have been selected, the "Create Queue" button can be clicked and then the queue would be created.

The queue can also be created from the cli using create-queue command as shown below.


        create-queue
        --queue-name <value>
        [--attributes <value>]
        [--cli-input-json <value>]
        [--generate-cli-skeleton <value>]