Amazon Simple Queue Service
Developer Guide

Amazon SQS Document History

The following table lists changes to the Amazon Simple Queue Service Developer Guide. For Amazon SQS feature releases and improvements, see Amazon SQS Release Notes.

Date Documentation Update
October 8, 2018 Updated the New and Frequently Viewed Amazon SQS Topics section.
October 3, 2018 Corrected the example IP address in the Give Permission to Requests from Amazon EC2 Instances section.
September 25, 2018 Corrected the information in the following sections:
September 10, 2018 Updated the New and Frequently Viewed Amazon SQS Topics section.
September 4, 2018
August 28, 2018 Updated the Protecting Data Using Server-Side Encryption (SSE) and AWS KMS section.
August 27, 2018 Corrected the information in the Actions and Resource Reference section.
August 22, 2018 Rewrote the Logging Amazon SQS API Calls Using AWS CloudTrail section.
August 21, 2018 Revised the attribute table in the Resources Required to Process Amazon SQS Messages section.
August 20, 2018 Added the following note to the Amazon SQS Dead-Letter Queues and Configuring an Amazon SQS Dead-Letter Queue section: When you designate a queue to be a source queue, a dead-letter queue is not created automatically. You must first create a normal standard or FIFO queue before designating it a dead-letter queue.
August 15, 2018 Added the following note to the Amazon SQS Long Polling section: You can confirm that a queue is empty when you perform a long poll and the ApproximateNumberOfMessagesDelayed, ApproximateNumberOfMessagesNotVisible, and ApproximateNumberOfMessagesVisible metrics are equal to 0 at least 1 minute after the producers stop sending messages (when the queue metadata reaches eventual consistency). For more information, see Available CloudWatch Metrics for Amazon SQS.
August 7, 2018 Clarified the information in the Inflight Messages section.
August 3, 2018 Updated the New and Frequently Viewed Amazon SQS Topics section.
July 25, 2018
July 6, 2018

Revised the following statements throughout this guide:

  • Visibility Timeout: The default visibility timeout for a message is 30 seconds. The minimum is 0 seconds. The maximum is 12 hours.

  • Message Timers: The default (minimum) invisibility period for a message is 0 seconds. The maximum is 15 minutes.

  • Delay Queues: The default (minimum) delay for a queue is 0 seconds. The maximum is 15 minutes.

July 5, 2018
July 3, 2018
June 28, 2018 Created the Configuring Messages Arriving in an Amazon SQS Queue to Trigger a Lambda Function tutorial.
June 26, 2018 Corrected the information in the How Do Dead-Letter Queues Work? section.
June 11, 2018
  • Added the following information to the Limits Related to Messages section: A batched message ID can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens (-), and underscores (_).

  • Clarified and corrected the information in the Using AmazonSQSBufferedAsyncClient section.

June 8, 2018 Updated the New and Frequently Viewed Amazon SQS Topics section.
June 5, 2018

In addition to GitHub, HTML, PDF, and Kindle, the Amazon MQ Developer Guide release notes are available as an RSS feed.

May 29, 2018
May 24, 2018 Updated the Protecting Data Using Server-Side Encryption (SSE) and AWS KMS section.
May 22, 2018
  • Corrected the information in all Java dependency sections.

  • Revised the following statement: For most standard queues (depending on queue traffic and message backlog), there can be a maximum of approximately 120,000 inflight messages (received from a queue by a consumer, but not yet deleted from the queue). If you reach this limit, Amazon SQS returns the OverLimit error message. To avoid reaching the limit, you should delete messages from the queue after they're processed. You can also increase the number of queues you use to process your messages. To request a limit increase, file a support request.

May 15, 2018 Clarified the information in the Processing Messages in a Timely Manner section.
May 10, 2018
May 9, 2018 Rewrote the Amazon SQS Message Timers section.
May 8, 2018
May 4, 2018 Updated the New and Frequently Viewed Amazon SQS Topics section.
May 3, 2018
May 2, 2018
May 1, 2018 Corrected and clarified the information in the Limits Related to Queues section.
April 25, 2018
April 24, 2018
April 23, 2018 Rewrote the Processing Messages in a Timely Manner section.
April 11, 2018
April 10, 2018
April 9, 2018
April 6, 2018
April 5, 2018
April 4, 2018
March 29, 2018 Added the following note to the Calculating the MD5 Message Digest for Message Attributes section: Always include custom data type suffixes in the MD5 message-digest calculation.
March 27, 2018
March 26, 2018
March 23, 2018
March 22, 2018
March 20, 2018
  • Clarified the following statement throughout this guide: An Amazon SQS message has three basic states:

    1. Sent to a queue by a producer.

    2. Received from the queue by a consumer.

    3. Deleted from the queue.

    A message is considered to be stored after it is sent to a queue by a producer, but not yet received from the queue by a consumer (that is, between states 1 and 2). There is no limit to the number of stored messages. A message is considered to be in flight after it is received from a queue by a consumer, but not yet deleted from the queue (that is, between states 2 and 3). There is a limit to the number of inflight messages.

  • Removed unnecessary screenshots and improved the explanation of diagrams in the Amazon SQS Tutorials, How Amazon SQS Works, and Amazon SQS Security sections.

  • Added a preamble to the Amazon SQS Queue and Message Identifiers section and clarified to which queue types various Amazon SQS identifiers correspond.

  • Corrected and clarified information and fixed the syntax highlighting in the Logging Amazon SQS API Calls Using AWS CloudTrail and Amazon SQS Security sections.

March 19, 2018 Clarified in the Limits Related to Policies and Adding Permissions to an Amazon SQS Queue sections that an Amazon SQS policy can have a maximum of 7 actions.
March 14, 2018
  • Updated and optimized the screenshots throughout this guide for better usability.

  • Improved the navigation in all the tutorials.

March 13, 2018 Clarified the batched and unbatched throughput for FIFO queues throughout this guide.
March 7, 2018 Updated the New and Frequently Viewed Amazon SQS Topics section.
March 2, 2018
February 28, 2018 Corrected image display in GitHub.
February 27, 2018 In addition to HTML, PDF, and Kindle, the Amazon Simple Queue Service Developer Guide is available on GitHub. To leave feedback, choose the GitHub icon in the upper right-hand corner.

February 26, 2018
  • Made regions consistent in all examples.

  • Optimized links to the AWS console and product webpages.

February 23, 2018
February 21, 2018
February 20, 2018
February 19, 2018 Optimized the example Java code and corrected pom.xml prerequisites in the following sections:
February 16, 2018 Simplified the example Java code and added pom.xml prerequisites to the following sections:
February 15, 2018 Updated the Related Amazon SQS Resources section.
February 14, 2018
February 13, 2018
February 9, 2018
February 8, 2018 Rewrote the Java example in the Working Java Example for Single-Operation and Batch Requests section.
February 7, 2018 Rewrote the following sections:
February 6, 2018 Rewrote the following sections:
February 5, 2018 Clarified the information in the Configuring an Amazon SQS Dead-Letter Queue section.
February 2, 2018 Created the New and Frequently Viewed Amazon SQS Topics section.
February 1, 2018
January 31, 2018 Clarified the information in the following sections:
January 30, 2018 Rewrote the following sections:
January 29, 2018 Rewrote the following sections:
January 25, 2018
January 24, 2018 Clarified the wording for Amazon SQS actions throughout this guide.
January 22, 2018 Added the Enable Compatibility between AWS Services and Queues with SSE section.
January 19, 2018 Clarified the information in the How Do Dead-Letter Queues Work? section.
January 18, 2018
  • Rewrote the code in the Creating a JMS Connection section, replacing the deprecated AmazonSQSClient constructor with AmazonSQSClientBuilder. Use the following syntax to create a new connection factory with all defaults (such as credentials and region) set:

    final SQSConnectionFactory connectionFactory = new SQSConnectionFactory( new ProviderConfiguration(), AmazonSQSClientBuilder.defaultClient());
  • Rewrote the code in the Horizontal Scaling section. Use the following syntax to adjust the maximum number of allowable producer and consumer threads on an AmazonSQSClientBuilder object:

    final AmazonSQS sqsClient = AmazonSQSClientBuilder.standard() .withClientConfiguration(new ClientConfiguration() .withMaxConnections(producerCount + consumerCount)) .build();
January 17, 2018
January 16, 2018
January 15, 2018
  • In the Managing Large Amazon SQS Messages Using Amazon S3 and Working with JMS and Amazon SQS sections, clarified the following explanation: The SDK for Java and Amazon SQS Extended Client Library for Java require the J2SE Development Kit 8.0 or later.

  • Added sub-sections to the Best Practices for Amazon SQS section and clarified and reorganized the content.

  • Added the following explanation to the Setting Up Dead-Letter Queue Retention section:

    The expiration of a message is always based on its original enqueue timestamp. When a message is moved to a dead-letter queue, the enqueue timestamp remains unchanged. For example, if a message spends 1 day in the original queue before being moved to a dead-letter queue, and the retention period of the dead-letter queue is set to 4 days, the message is deleted from the dead-letter queue after 3 days. Thus, it is a best practice to always set the retention period of a dead-letter queue to be longer than the retention period of the original queue.

  • Clarified the information in the How Do Dead-Letter Queues Work? section.

  • Added the following explanation to the Amazon SQS Visibility Timeout section: The default visibility timeout for a message is 30 seconds. The minimum is 0 seconds. The maximum is 12 hours.

January 3, 2018 Further clarified the throughput for FIFO queues throughout this guide.
December 7, 2017
December 6, 2017
December 1, 2017 Clarified and reorganized the information in the Monitoring Amazon SQS Queues Using CloudWatch section.
October 30, 2017
October 27, 2017 Clarified the explanation of throughput for FIFO queues in the Amazon SQS FIFO (First-In-First-Out) Queues section.
September 29, 2017 Added a note about the Amazon SQS Buffered Asynchronous Client to the Increasing Throughput using Horizontal Scaling and Action Batching section.
September 19, 2017 Corrected the diagrams in the Using Amazon SQS and IAM Policies section.
August 29, 2017 Clarified the information in the Changing the Visibility Timeout for a Message section.
August 17, 2017 Clarified the permissions for the SendMessage and SendMessageBatch actions in Actions and Resource Reference.
August 15, 2017 Updated information about dead-letter queues in the Recommendations for Amazon SQS Standard and FIFO (First-In-First-Out) Queues section.
August 9, 2017
July 27, 2017

Changed the deprecated AmazonSQSClient constructor to AmazonSQSClientBuilder and revised the corresponding region specification in the Working Java Example for Standard Queues section.

July 25, 2017 Clarified the throughput for standard and FIFO queues throughout this guide.
July 20, 2017 Clarified the compatibility between Amazon SQS SSE queues and AWS and third-party service features throughout this guide:

Some features of AWS services that can send notifications to Amazon SQS using the AWS Security Token Service AssumeRole action are compatible with SSE but work only with standard queues:

Other features of AWS services or third-party services that send notifications to Amazon SQS aren't compatible with SSE, despite allowing you to set an encrypted queue as a target:

For information about compatibility of other services with encrypted queues, see Enable Compatibility between AWS Services and Queues with SSE and your service documentation.

June 23, 2017

Corrected the information in the Limits Related to Messages section.

June 20, 2017

Clarified the information in the Amazon SQS Dead-Letter Queues section.

June 2, 2017
June 1, 2017

Updated the What Is Amazon Simple Queue Service? section.

May 24, 2017
May 23, 2017 Server-side encryption (SSE) for Amazon SQS is available in the US East (N. Virginia) Region, in addition to the US East (Ohio) and US West (Oregon) Regions. For more information about server-side encryption and how to get started using it, see Protecting Data Using Server-Side Encryption (SSE) and AWS KMS.
May 19, 2017
April 25, 2017 Restructured and updated the Amazon SQS Long Polling section.
February 6, 2017 Updated the Authentication and Access Control section.
December 16, 2016 Retired the Amazon Simple Queue Service Getting Started Guide and incorporated some of its content into the following sections of this guide:
December 2, 2016 Restructured and updated the Authentication and Access Control section.
November 2, 2016 Renamed the Walkthroughs section to Amazon SQS Tutorials.
May 27, 2016 Added the Best Practices for Amazon SQS section.
May 12, 2016 Added the Amazon SQS Limits section.
December 7, 2015

Updated Amazon SQS console screenshots.

August 4, 2014

Updated information about access keys. For more information, see Authenticating Requests.