Amazon SQS (Simple Queue Service) in AWS

Share via:

Dear Readers,

In this article,we will see brief introduction on Amazon SQS(Simple Queue Service).

Amazon SQS (Simple Queue Service)

Amazon Simple Queue Service (SQS) is a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, and serverless applications.

SQS eliminates the complexity and overhead associated with managing and operating message oriented middleware, and empowers developers to focus on differentiating work. Using SQS, you can send, store, and receive messages between software components at any volume, without losing messages or requiring other services to be available.

Get started with SQS in minutes using the AWS console, Command Line Interface or SDK of your choice, and three simple commands.

SQS offers two types of message queues. Standard queues offer maximum throughput, best-effort ordering, and at-least-once delivery.

SQS FIFO queues are designed to guarantee that messages are processed exactly once, in the exact order that they are sent.

SQS is a simple queue used to store messages while waiting for a computer to process them

Queue is a temporary repository for messages that are awaiting process.

Queue Types

1.Standard Queue

Default queue

Messages can go out of order

Unlimited no of transactions per second

2.FIFO (First In First Out)

Not a default queue

Messages will go in exact order

300 transactions per second

Key Points

SQS is a pull based, but not push based

Decoupling mechanism

Messages can contain up to 256 KB of text in any format

Messages can kept in the queue from 1 min to 14 days max

Default retention period is 4 days

SQS guarantee that your messages will be processed at least once.

Visibility Timeout

The visibility timeout is the amount of time that the messages is invisible in the SQS queue after a reader picks up that message.

Provided the job is processed before the visibility time out expires, the message will then be deleted from the queue.

If the job is not processed with in that time, the message become visible again and another reader will process it.

Default visibility timeout is 30 seconds.

Increase it if your task takes > 30 seconds

Maximum Is 12 hours.

SQS Long Polling

It is a way to retrieve messages from your SQS queue

Polls the queue periodically as per the time interval we set.

Long Polling can save your money.


Eliminate Administrative Overhead

AWS manages all ongoing operations and underlying infrastructure needed to provide a highly available and scalable message queuing service. With SQS, there is no upfront cost, no need to acquire, install, and configure messaging software, and no time-consuming build-out and maintenance of supporting infrastructure. SQS queues are dynamically created and scale automatically so you can build and grow applications quickly and efficiently.

Reliably Deliver Messages

Use Amazon SQS to transmit any volume of data, at any level of throughput, without losing messages or requiring other services to be available. SQS lets you decouple application components so that they run and fail independently, increasing the overall fault tolerance of the system. Multiple copies of every message are stored redundantly across multiple availability zones so that they are available whenever needed.

Keep Sensitive Data Secure

You can use Amazon SQS to exchange sensitive data between applications using server-side encryption (SSE) to encrypt each message body. Amazon SQS SSE integration with AWS Key Management Service (KMS) allows you to centrally manage the keys that protect SQS messages along with keys that protect your other AWS resources. AWS KMS logs every use of your encryption keys to AWS CloudTrail to help meet your regulatory and compliance needs.

Scale Elastically And Cost-Effectively

Amazon SQS leverages the AWS cloud to dynamically scale based on demand. SQS scales elastically with your application so you don’t have to worry about capacity planning and pre-provisioning. There is no limit to the number of messages per queue, and standard queues provide nearly unlimited throughput. Costs are based on usage which provides significant cost saving versus the “always-on” model of self-managed messaging middleware.


Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates

KTEXPERTS is always active on below social media platforms.

Facebook :
LinkedIn :
Twitter :
YouTube :
Instagram :

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

Add Comment