Creating an Amazon SQS Queue and Playing with Messages | Scribe

    Creating an Amazon SQS Queue and Playing with Messages

    • Hafeez Baig |
    • 30 steps |
    • 4 minutes
    information ordinal icon

    Refer to the following guide to learn how to use IAM in the cloud\ <https://scribehow.com/shared/Creating_an_IAM_User_and_User_Group_in_AWS_Management_Console__hWNiiXlcRJKFqYZZEJD-cg>

    1

    Sign in to **AWS Management Console** as an **IAM User** **Pre-requisite** - Ensure you have selected the AWS region closest to your location\ For this guide, we will be using us-east-2 (Ohio) as a preferred choice

    2

    Type **Simple Queue Service** in the search bar and click on **Simple Queue Service** to view the **Amazon SQS** page

    information ordinal icon

    **What is Simple Queue Service in AWS?** Amazon Simple Queue Service (SQS) is a fully managed message queuing service provided by AWS. It enables you to decouple and scale microservices, distributed systems, and serverless applications by allowing components to communicate asynchronously.

    3

    **Amazon SQS** page will open, on the right side click on the **Create queue** button

    4

    **Create queue** wizard will open, select the **Standard** option as **Type**

    information ordinal icon

    In Amazon SQS, there are two types of queues: Standard queues and FIFO (First-In-First-Out) queues. 1. **Standard Queues**: - Standard queues offer a high-throughput, best-effort delivery capability. - They guarantee that a message is delivered at least once, but occasionally more than once and messages can arrive in any order. 2. **FIFO Queues**: - FIFO queues are designed to guarantee that messages are processed exactly once and in the order that they are sent. - They maintain the order of messages and ensure the exact-once processing of each message.

    5

    Scroll to the Name section and give Name as "**first-standard-queue"**

    6

    Scroll to the **Configuration** section, give "**30**" in the text input field for **Visibility timeout**

    information ordinal icon

    **What is Visibility timeout?** Visibility timeout is a setting in Amazon SQS (Simple Queue Service) that determines how long a message remains invisible to other consumers after being received by one consumer. When a consumer receives a message from the queue, the message becomes invisible to other consumers for the duration of the visibility timeout period.

    7

    For **Message retention period** give "4" in the text input field

    information ordinal icon

    **What is the Message retention period?** Message retention period, in the context of Amazon SQS (Simple Queue Service), refers to the duration for which messages are stored in a queue before they are automatically deleted. When a message is sent to an SQS queue, it remains in the queue for the duration specified by the message retention period, after which it is removed from the queue, regardless of whether it has been consumed by a consumer or not.

    8

    For **Maximum message size** give "**256**" in the text input field

    information ordinal icon

    **What is the** **Maximum message size?** The Maximum message size in Amazon SQS (Simple Queue Service) refers to the maximum size limit for individual messages that can be sent to an SQS queue. This limit represents the maximum amount of data, in bytes, that can be included in a single message payload.

    9

    For **Delivery delay** and **Receive message wait time** give "**0**" in the text input field

    information ordinal icon

    **What is the Delivery delay and Receive message wait time?** 1. **Delivery Delay**: This feature allows you to specify a delay period for the delivery of messages to the queue after they are sent. During this delay period, messages remain in the queue but are not immediately available for retrieval by consumers. 2. **Receive Message Wait Time**: Receive message wait time (also known as long polling) determines how long the Receive Message API call will wait for messages to become available in an empty queue before returning an empty response.

    10

    Scroll to the **Encryption** section, select the **Enabled** radio button for **Server-side encryption**, and select the **Amazon SQS key (SSE-SQS)** radio button for **Encryption key type**

    information ordinal icon

    **What is Encryption in Amazon SQS?** Encryption in Amazon SQS (Simple Queue Service) involves encrypting the messages stored in SQS queues to protect their confidentiality and integrity. SQS supports encryption at rest, which means that messages are encrypted while they are stored persistently in SQS queues. This encryption helps safeguard sensitive data from unauthorized access or tampering.

    11

    Scroll to the **Dead-letter queue** section and select the option **Disabled** for **Set this queue to recieve undeliverable messages**

    information ordinal icon

    **What is Dead-letter queue in Amazon SQS?** A Dead-Letter Queue (DLQ) in Amazon SQS (Simple Queue Service) is a special queue that stores messages that cannot be processed successfully after a certain number of attempts. When messages repeatedly fail to be processed (for example, due to errors in message handling logic or temporary issues with the processing environment), SQS moves these problematic messages to the Dead-Letter Queue to prevent them from continuously consuming resources and potentially causing processing delays for other messages.