AWS SQS Cheat Sheet

  • Amazon SQS is a hosted queue service
  • Secure, Durable, Scalable and Reliable
  • Facilitates integration of components
  • No upfront cost.
  • 1 Million free monthly requests.
  • Message size can be upto 256KB.
  • Default message retention period is 4 days. Can be modified to retain upto 14 days.
  • Supports Delay Queue – You can set ‘Delivery delay’ of upto 15 minutes. Default is 0 seconds.
  • Supports Dead Letter Queue – Failed messages can be sent to a dead letter queue.
  • Visibility Timeout – Default is 30 seconds. Can be configured to a maximum of upto 12 hours. Message becomes invisible for other consumers after it is picked up by 1 consumer. If the message is not processed within the visibility timeout, message becomes visible again for other consumers to pick it up.
  • Pull based. Not push based.
  • Supports Server-Side Encryption.
  • Stores messages on multiple servers for durability and availability.
  • All the messages in a queue can be deleting by purging the queue.
  • 2 Types of Queues
    • Standard Queue
      • Default queue type
      • Messages are delivered atleast once and sometimes more than once
      • Throughput is unlimited transactions per second.
      • Message sent order and Delivery order might be different
    • FIFO Queue
      • Throughput is upto 300 API Calls per second.
      • Supports batching – Each Batch can contain upto 10 messages
      • Thus throughput is upto 3000 messages per second
      • Message is delivered only once
      • Messages are delivered in the same order that they are sent.
  • 2 Types of polling
    • Short Polling
      • Returns data immediately
      • ReceiveMessageWaitTimeSeconds is 0
    • Long Polling
      • Enabled at Queue level.
      • Lower cost.
      • ReceiveMessageWaitTimeSeconds is greater than 0 and upto 20 seconds.
  • Queue Attributes
    • DelaySeconds
    • MaximumMessageSize
    • MessageRetentionPeriod
    • Policy
    • ReceiveMessageWaitTimeSeconds
    • RedrivePolicy
    • deadLetterTargetArn 
    • maxReceiveCount
    • VisibilityTimeout
    • ContentBasedDeduplication (FIFO only)
    • MessageDeduplicationId
See also  AWS Lambda Cheat Sheet