Amazon Simple Queue Service (Amazon SQS) is a fully managed message queuing service designed to decouple and scale microservices, distributed systems, and serverless applications. Amazon SQS simplifies the complexity and overhead involved in managing and operating message-oriented middleware systems.
It delivers a robust, secure, and highly scalable solution that allows developers to focus on building functionality rather than worrying about the underlying infrastructure required to pass messages between different components of an application.
The core premise of Amazon SQS is to send, store, and receive messages between software components at any volume, without losing messages or requiring other services to be available. This makes it an incredibly valuable tool for building applications that require communication and coordination between separate services, such as order processing workflows, distributed systems where different components perform different tasks, and applications that must process actions initiated by users or services.
Receiving a message does not delete it: it remains in the queue and is hidden from subsequent receive requests for the visibility timeout. The consumer must delete the message after processing to prevent it from being received and processed again when that timeout expires.
Messages expire automatically after the queue's retention period. The default is 4 days, configurable from 60 seconds to 14 days.
One of the key features of Amazon SQS is its support for two types of queues: Standard Queues and FIFO (First-In-First-Out) Queues. Standard Queues offer maximum throughput, best-effort ordering, and at-least-once delivery, which means messages are delivered at least once, but not necessarily in the exact order they were sent. On the other hand, FIFO Queues are designed to guarantee that messages are processed exactly once, in the order that they are sent, which is critical for certain business operations that cannot tolerate duplicate processing or out-of-order messages.
Fair queues extend standard queues to mitigate noisy-neighbor impact in multi-tenant systems, helping maintain consistent message dwell times across tenants while retaining standard queue scalability and throughput.
Security in Amazon SQS is robust, offering encryption in transit and at rest, ensuring that messages are protected against unauthorized access. Additionally, Amazon SQS is integrated with AWS Identity and Access Management (IAM), allowing fine-grained control over who can send and receive messages on each queue. Amazon SQS is designed for high availability and durability. Messages stored in SQS are automatically replicated across multiple servers and data centers to prevent loss, ensuring that the system is resilient to failures and that messages are available when needed.
Server-side encryption uses Amazon SQS managed encryption by default; custom encryption keys managed in AWS KMS are another option.
The service is also highly scalable, allowing applications to send and receive thousands of messages per second. This scalability is mostly transparent to the user, as Amazon SQS can automatically adjust to changes in the volume of message traffic without any manual intervention, making it a perfect match for applications that experience variable workloads.
Stored-message counts are unlimited, but in-flight messages—received by a consumer and not yet deleted—are limited. Most standard queues have a limit of approximately 120,000 in-flight messages and return an OverLimit error when it is reached; FIFO queues have a limit of 120,000 and return no error when it is reached.
FIFO queues also offer a high throughput mode that you can enable in the Amazon SQS console. This mode supports up to 70,000 messages per second without batching and higher throughput with batching, with quotas varying by region.
Pricing for Amazon SQS is based on usage without any upfront costs, making it an economical choice for businesses of all sizes. Request fees are based on billable API requests rather than individual messages: every Amazon SQS action counts as a request, and each 64 KB chunk of a payload is billed as one request. This pay-as-you-go model allows businesses to start small and scale as their needs grow, without incurring significant initial costs.
Overall, Amazon Simple Queue Service is a highly reliable, secure, and scalable service that simplifies the task of message queuing for developers. Its wide range of features, combined with its integration into the AWS ecosystem, makes it an essential tool for modern application development, particularly in environments where services need to communicate asynchronously.
/covers/Arch_Amazon-Simple-Queue-Service_64.png)