Table of Contents
What is Amazon Simple Queue Service? ........................................................................................... 1
Architectural Overview ........................................................................................................... 1
Amazon SQS Features ........................................................................................................... 2
How Amazon SQS Queues Work ..................................................................................................... 3
Properties of Distributed Queues ............................................................................................. 4
Message Order ............................................................................................................. 4
At-Least-Once Delivery .................................................................................................. 4
Message Sample .......................................................................................................... 4
Queue and Message Identifiers ............................................................................................... 5
Queue URLs ................................................................................................................ 5
Message IDs ................................................................................................................ 5
Receipt Handles ............................................................................................................ 6
Resources Required to Process Messages ................................................................................ 6
Visibility Timeout ................................................................................................................... 6
General Recommendations for Visibility Timeout ................................................................. 7
Extending a Message's Visibility Timeout ........................................................................... 7
Terminating a Message's Visibility Timeout ......................................................................... 8
API Actions Related to Visibility Timeout ............................................................................ 8
Message Lifecycle ................................................................................................................. 8
Message Attributes ...................................................................................................................... 10
Message Attribute Items and Validation ................................................................................... 10
Data Types ......................................................................................................................... 11
Using Message Attributes with the AWS Management Console .................................................... 11
Using Message Attributes with the AWS SDKs .......................................................................... 14
Using Message Attributes with the Amazon SQS Query API ........................................................ 16
MD5 Message-Digest Calculation ........................................................................................... 17
Long Polling ................................................................................................................................ 19
Enabling Long Polling with the AWS Management Console ......................................................... 20
Enabling Long Polling with the Query API ................................................................................ 22
Delay Queues ............................................................................................................................. 24
Creating Delay Queues with the AWS Management Console ....................................................... 25
Creating Delay Queues with the Query API .............................................................................. 27
Message Timers .......................................................................................................................... 28
Creating Message Timers Using the Console ............................................................................ 28
Creating Message Timers Using the Query API ......................................................................... 30
Batch API Actions ........................................................................................................................ 32
Maximum Message Size for SendMessageBatch ...................................................................... 32
Making API Requests ................................................................................................................... 33
Endpoints ........................................................................................................................... 34
Making Query Requests ....................................................................................................... 35
Structure of a GET Request .......................................................................................... 35
Structure of a POST Request ........................................................................................ 36
Related Topics ............................................................................................................ 37
Making SOAP Requests ....................................................................................................... 37
Request Authentication ......................................................................................................... 38
What Is Authentication? ................................................................................................ 38
Your AWS Account ....................................................................................................... 40
Your Access Keys ........................................................................................................ 40
HMAC-SHA Signatures ................................................................................................. 40
Query Request Authentication ....................................................................................... 45
Responses ......................................................................................................................... 46
Structure of a Successful Response ................................................................................ 46
Structure of an Error Response ...................................................................................... 46
Related Topics ............................................................................................................ 47
Shared Queues ................................................................................................................... 48
API Version 2012-11-05
iii
Amazon Simple Queue Service Developer Guide