Amazon Simple Queue Service (Amazon SQS)

Amazon Simple Queue Service (Amazon SQS) - is a messaging solution which lets you send, store, and receive an unlimited amount of messages. Can be used as a communication message bus for components of distributed software at any volume, without losing messages or requiring other services to be available.

Key definitions for Amazon Simple Queue Service (Amazon SQS):

  • Service supports batch actions

    Send, receive or delete up to 10 messages or 256 KB

  • Message locking

    Message became “locked” while being processed. This keeps other consumers from processing the same message simultaneously. If processing fails, the message will be available again.

  • Simultaneous send and read messages

  • Service provides unlimited queues and messages

  • Store messages in queues for up to 14 days

  • Support of long pooling

    Service automatically reduces extraneous polling to minimize cost while receiving new messages ASAP. When the queue is empty, long-poll requests automatically wait up to 20 seconds before request for the next message from the queue.

  • Service supports queue sharing

    Anonymously or with specific AWS accounts. In addition queue sharing can be restricted by IP addresses and/or time-of-day.

  • AWS SQS supports server-side encryption (SSE) from the box

    Simple and easy integration with AWS KMS provides protection of the contents of messages in Amazon SQS queues. SSE applies to the messages as soon as service receives them in the queue. The messages are stored in a queue in encrypted form. Service decrypts and sends messages only to an authorized consumer.

  • Compliance

    AWS Step Functions qualifies as a HIPAA eligible service, suitable for applications involving healthcare data like personal health information (PHI). The service aligns with SOC (System & Organization Control) standards, with audit outcomes accessible on the AWS SOC Compliance site. More details on AWS Cloud Security site.

  • Service supports Dead Letter Queues (DLQ)

    Messages which exceed the maximum received count can be redirected to DLQs and handled there. Type of associated DLQ should be the same as a main queue.

  • Service offers two types of queue: standard and fifo

    • Standard:
      • almost unlimited TPS (transactions per second)
      • at least one delivery (can be more)Without strict respect of message order
    • Fifo:
      • high throughput, up to 300 TPS for single actions and up to 3000 for batch actions
      • exactly one delivery of message
      • First-In-First-Out approach for message order

Service integrates with:

Usage use cases

  • Work Queues.

    Communication between distributed parts of the system can be built using service. This decoupling of system components using AWS SQS also can help with data processing and divide scope of data per service.

  • Buffer and Batch Operations.

    SQS can be used to cache or buffer data on load spices without losing messages and process them by components of the system in respect with exist resources

  • Request Offloading.

    Process slow operations in background.

  • Fanout.

    Service can be used in combination with AWS SNS to replicate same message in multiple queue for parallel processing of it.

  • Priority.

    Prioritization of the work can be achieved by using separate queues for each type of work.

  • Scalability.

    Service provides an easy way to scale for distributed apps. All what is needed it's only add another instance of the component and connect it to the same queue.

  • Resiliency.

    Message queue decouples parts of the system, so downtime of one part may not affect other parts of the system.

FAQ for Amazon Simple Queue Service (Amazon SQS)

  • What types of queues does SQS support?

    For now AWS SQS supports two types of queues: standard (unlimited TPS, can be multiple delivery of same message and no strict order of messages) and fifo (up to 3000 TPS, exactly one message delivery and First In First Out approach for messages)
  • What amount of queues and messages does SQS support?

    There are no limits for the amount of queues and messages.
  • What limitations does service have for batch actions?

    Service supports batch actions for up to 10 messages or 256 KB.