AWS SQS in Pictures

Lee Harding
circuitpeople
Published in
6 min readMar 30, 2020

--

Or, the simple complexity of SQS explained with sequence diagrams.

SQS is almost universally underestimated, but AWS’s oldest service is imbued with subtle power and complexity. Power to process messages at incredible velocity, and the complexity of API calls involving implicit state and/or side-effects. Keep reading to get the low-down on SQS.

Why?

Not “why SQS?’ but “why write about it?”. I assume you have some (or more) understanding of what a queue is, and probably already use SQS so there is no need for me to (re-)document the simple API for you.

My “why” is that I was asked to review changes to a message handling system. The system needed to be upgraded to delay message processing to “daytime hours” as defined by a local time zone. The answer was “it already can” because it was using SQS — something the original developers didn’t realize.

I thought I’d just find a quality article on the subject, but surprisingly I couldn’t find a good one so I slapped together some sequence diagrams to demonstrate the concepts. In a nutshell, if you’re using SQS and don’t understand exactly what “In Flight” means, or how long “Message Visibility” is (and under what condition) then this might be helpful.

Putting the “Simple” in a Queue Service

Let’s start with the happy path — this is how the vast majority of use cases of SQS work, the simplest way possible:

--

--