A. Queues Dashboard

From the AWS management console, select SQS (Simple Queue Service), or you can directly go to the Queues dashboard. Start the Create queue wizard from there.

Launch Create queue from Amazon SQS homepage

Launch Create queue from Queues dashboard

B. Create a Queue

A queue can be created quickly in three steps:

Snapshot: Create queue — General details

  • Message retention period — The duration (1 minute — 14 days) for which the queue retains a message that does not get deleted. Amazon SQS will automatically delete messages that have been in a queue for more than the specified period.
  • Delivery delay — The time (0 seconds — 15 minutes) to intentionally delay the delivery of each (new) message added to the queue. According to AWS:
    If your consumers need additional time to process messages, you must delay each new message coming to the queue.
  • Maximum message size — It should be between 1 KB and 256 KB.

Snapshot: Create queue — Configuration details

Snapshot: Create queue — Access policy

C. Details of an Existing Queue

Select a queue from the Queues dashboard to view the basic details and configuration.

Snapshot: Details of an existing queue

In the snapshot above, the URL https://sqs.us-east-2.amazonaws.com/014421265158/MyQueue is an essential field to use in your application components. In addition, you can also view details about the Lambda triggers, and the access policy. You can even monitor various metrics, such as approximate age of message, the number of messages sent/received/delayed/deleted/empty receives, and size consumed by sent messages.

D. Send and receive messages

For the selected queue, you can either send/receive messages or configure Lambda function trigger. Let’s see how to send and receive messages using a Standard queue.

Snapshot: Message body and delay duration while sending a message

Snapshot: Poll for messages to receive messages

Snapshot: View the message details, body, and metadata.

Note: SQS pricing is based on the count and size of messages, and the interactions with Amazon S3 and the AWS Key Management Service.

External Resource

  1. Basic Amazon SQS architecture
  2. Refer to the Getting started with Amazon SQS, that demonstrates the following steps:
  • Step 2: Send a message
  • Step 3: Receive and delete your message
  • Step 4: Delete your queue

--

--

bootcampai.org

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store