Amazon Simple Queue Service
Developer Guide

Getting Started with Amazon SQS

This section helps you become more familiar with Amazon SQS by showing you how to manage queues and messages using the AWS Management Console.


Before you begin, complete the steps in Setting Up Amazon SQS.

Step 1: Create a Queue

The first and most common Amazon SQS task is creating queues. In this tutorial you'll learn how to create and configure a queue.

  1. Sign in to the Amazon SQS console.

  2. Choose Create New Queue.

  3. On the Create New Queue page, ensure that you're in the correct region and then type the Queue Name.


    The name of a FIFO queue must end with the .fifo suffix.

  4. Standard is selected by default. Choose FIFO.

  5. To create your queue with the default parameters, choose Quick-Create Queue.

    Your new queue is created and selected in the queue list.


    When you create a queue, it can take a short time for the queue to propagate throughout Amazon SQS.

    The Queue Type column helps you distinguish standard queues from FIFO queues at a glance. For a FIFO queue, the Content-Based Deduplication column displays whether you have enabled exactly-once processing.

    Your queue's Name, URL, and ARN are displayed on the Details tab.

Step 2: Send a Message

After you create your queue, you can send a message to it. The following example shows sending a message to an existing queue.

  1. From the queue list, select the queue that you've created.

  2. From Queue Actions, select Send a Message.

    The Send a Message to QueueName dialog box is displayed.

    The following example shows the Message Group ID and Message Deduplication ID parameters specific to FIFO queues (content-based deduplication is disabled).

  3. To send a message to a FIFO queue, type the Message Body, the Message Group ID MyMessageGroupId1234567890, and the Message Deduplication ID MyMessageDeduplicationId1234567890, and then choose Send Message. For more information, see FIFO Delivery Logic.


    The message group ID is always required. However, if content-based deduplication is enabled, the message deduplication ID is optional.

    Your message is sent and the Send a Message to QueueName dialog box is displayed, showing the attributes of the sent message.

    The following example shows the Sequence Number attribute specific to FIFO queues.

  4. Choose Close.

Step 3: Receive and Delete Your Message

After you send a message into a queue, you can consume it (retrieve it from the queue). When you request a message from a queue, you can't specify which message to get. Instead, you specify the maximum number of messages (up to 10) that you want to get.

In this tutorial you'll learn how to receive and delete a message.

  1. From the queue list, select the queue that you have created.

  2. From Queue Actions, select View/Delete Messages.

    The View/Delete Messages in QueueName dialog box is displayed.


    The first time you take this action, an information screen is displayed. To hide the screen, choose Don't show this again.

  3. Choose Start Polling for messages.

    Amazon SQS begins to poll the messages in the queue. The dialog box displays a message from the queue. A progress bar at the bottom of the dialog box displays the status of the message's visibility timeout.

    The following example shows the Message Group ID, Message Deduplication ID, and Sequence Number columns specific to FIFO queues.


    When the progress bar is filled in, the visibility timeout expires and the message becomes visible to consumers.

  4. Before the visibility timeout expires, select the message that you want to delete and then choose Delete 1 Message.

  5. In the Delete Messages dialog box, confirm that the message you want to delete is checked and choose Yes, Delete Checked Messages.

    The selected message is deleted.

  6. Select Close.

Step 4: Delete Your Queue

If you don't use an Amazon SQS queue (and don't foresee using it in the near future), it is a best practice to delete it from Amazon SQS. In this tutorial you'll learn how to delete a queue.

  1. From the queue list, select the queue that you have created.

  2. From Queue Actions, select Delete Queue.

    The Delete Queues dialog box is displayed.

  3. Choose Yes, Delete Queue.

    The queue is deleted.

Next Steps

Now that you've created a queue and learned how to send, receive, and delete messages and how to delete a queue, you might want to try the following: