!! UseCases Of AWS SQS !!

Jatt singh
5 min readMar 15, 2021

What is AWS SQS ?

Amazon Simple Queue Service (Amazon SQS) is a pay-per-use web service for storing messages in transit between computers. Developers use SQS to build distributed applications with decoupled components without having to deal with the overhead of creating and maintaining message queues.

Working of SQS?

SQS provides an API endpoint to submit messages and another endpoint to read messages from a queue. Each message can only be retrieved once, and you can have many clients submitting messages to and reading messages from a queue at the same time.

Why do we need SQS?

Consider the above scenario of Order confirmation and mailing the customer an acknowledgment of the confirmed order. If a consumer buys an item, the records are to be stored in the Database and to be sent to a mail server to get the confirmation of the order via email.

In the tightly coupled architecture (The red path), if the server goes down there would be a loss of data transmitted at the moment. A tightly coupled system is a concept of system design and computing where every hardware and software component are linked together in such a manner that each component is dependent upon the other. So if the customer confirms the order and if the database server is down (even for a fraction of a second) the data of the order confirmation would not be recorded in the system but the email for the order confirmation would be received by the customer. This is inadmissible.

Whereas, a loosely coupled system is one in which each of its components has, or makes use of, little or no knowledge of the definitions of other separate components. In the above architecture, the green path follows a loosely coupled system architecture. Amazon SQS is a component of the loosely coupled architecture. When the customer confirms the order the data is sent to the Message Queue. The Message Queue keeps the data until the data is been received by the servers in a specific order if the servers go down due to some reason. The eliminates the potential data loss as compared to a tightly coupled architecture. System Components and Services like Amazon SQS are termed as middleware.

Benefits

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.

Case studies :-

AWS Services Used: IoT Device Management, Amazon ECS, & Amazon SQS.

Petroleum retailers in Australia are improving the performance and safety of their service stations with an AWS IoT–enabled solution called Fuelsuite from EMS. EMS specializes in solutions that provide petrol retailers with performance data gathered from sensors located around petrol stations. Fuelsuite uses AWS IoT Device Management to control the edge devices collecting petrol station data, processes the data with Amazon EC2, and schedules messages to and from the edge devices by using Amazon SQS.

AWS Services Used: Amazon SNS & Amazon SQS

The NASA Image and Video Library provides easy access to more than 140,000 still images, audio recordings, and videos — documenting NASA’s more than half a century of achievements in exploring the vast unknown. The architecture includes Amazon SQS to decouple incoming jobs from pipeline processes and Amazon Simple Notification Service to trigger the processing pipeline when new content is updated.

AWS Services Used: Amazon SQS

Capital One is modernizing their retail message queuing by migrating from self-managed message-oriented middleware systems to Amazon SQS. Capital One is using SQS to migrate several core banking applications to the cloud to ensure high availability and cost efficiency while simplifying administrative complexity and overhead.

Thanks for reading !!

#vimaldaga #righteducation #educationredefine #rightmentor #worldrecordholder #linuxworld #makingindiafutureready #righeducation #arthbylw #aws #awssqs #amazonwebservice

--

--