Skip to main content

Command Palette

Search for a command to run...

Understanding AWS Messaging Services: A Complete Guide

Published
6 min readView as Markdown
Understanding AWS Messaging Services: A Complete Guide
S

I am a student. I am enthusiastic about learning new things.

Hi there! 👋

I’m Dhyuthidhar, and if you’re new here, welcome! I love exploring computer science topics, especially machine learning, and breaking them down into easy-to-understand concepts. Today, let’s talk about messaging services in AWS.

In the last blog, I concluded that ELB is used for both the front end and the back end. So, let me explain it to you more.

Have you ever tried scaling a business only to face inefficiencies? You add more resources, but they don’t always work as expected. In cloud computing, this is a common challenge—and AWS services like ELB, SQS, and SNS offer a solution.

Ordering Tier and Production Tier Communication

  • The ordering tier serves as the frontend of the software, while the production tier operates as the backend.

  • When a new backend instance is introduced, it must notify the ordering tier that it is ready to handle traffic. Managing this process becomes increasingly complex as the number of backend instances grows.

  • For example, with half a dozen instances, coordination can already pose challenges, and this complexity only increases with more servers in the backend.

  • To address this issue, we can utilize an Elastic Load Balancer (ELB). Since ELB is regional, it provides a single URL that all frontend instances can use.

  • The ELB then efficiently directs traffic to the backend instance with the least load.

When a new backend instance is ready, it simply informs the ELB that it can accept traffic. This allows the ELB to seamlessly route tasks to the new instance, simplifying backend management and ensuring efficient traffic distribution.

This is true decoupled architecture.

Various methods can be used to achieve backend communication, one of which is using an ELB (Elastic Load Balancer).

Messaging and Queuing

Let’s take a simple analogy: a coffee shop with two employees.

  • Bay → Order Taker

  • Brent → Barista

Bay takes customer orders on paper and passes them to Brent, who makes the coffee and gives it back to the customer. This system works well until one day, Brent has a headache and takes frequent breaks. During those breaks, Bay doesn’t know where to hand off the paper, leading to misplaced orders and frustrated customers.

To fix this, we introduce an order board as a buffer between Bay and Brent. Instead of handing the paper directly to Brent, Bay posts the order on the board, allowing Brent to pick it up when he is ready.

This is where messaging and queuing come into play.

Tightly Coupled vs. Loosely Coupled Architecture

  • Tightly Coupled Architecture (Before the Buffer)

    • A (Bay) directly hands off the order to B (Brent).

    • If B fails (takes a break), A doesn’t know what to do. → System breaks.

  • Loosely Coupled Architecture (With the Buffer)

    • A posts messages to a queue instead of directly to B.

    • If B fails, the queue holds messages until he is back.

    • Prevents cascading failures and makes the system more reliable.

Amazon Simple Queue Service (SQS)

  • This is the messaging service between the components.

  • It enables you to send, receive, and store messages between software components at any scale.

  • Consider a coffee shop as an example. It typically has two key roles: the order taker and the barista.

    • The order taker will place the message inside the queue.

    • This queue will retain the message until the barista retrieves it.

    • The message includes the customer's name, the type of coffee ordered, and the order timestamp.

    • The data inside the message is called the "payload.”

  • The queue will protect the message until delivery.

  • And AWS manages the underlying architecture for you to host the queues.

  • These queues are highly scalable, dependable, and simple to configure and operate.

    // Let’s put an image of component 1 and queue box holding messages and then component 2

Amazon Simple Notification Service (SNS)

  • This service operates similarly to the one mentioned above, enabling the transmission of messages to various services and notifications to end users.

  • However, it utilizes a distinct approach known as the "publish/subscribe model" or "pub/sub model."

  • So to publish a message, we need a channel to send those notifications or messages to the end user or services, that can be created by you, and it is called an “SNS topic“.

  • You then configure subscribers to that topic and send messages for those subscribers in practice.

  • That means, you will send a message to a topic, and it will put it out to all the subscribers in a single go.

  • Subscribers in this context can be -:

    • End user

    • SQS queues

    • AWS lambda functions

    • HTTP or HTTPS webhooks

  • SNS can be used to put out notifications to all the end users using an email, SMS, or mobile push.

  • In the analogy of a coffee shop, the customer can get to know their order is ready through a message or mobile push notification.

Conclusion

Efficient communication is key to building scalable and reliable systems. Modern businesses need systems that can grow easily, handle unexpected problems, and maintain steady performance. AWS services like Elastic Load Balancer (ELB), Simple Queue Service (SQS), and Simple Notification Service (SNS) help create flexible and fault-tolerant systems.

SQS ensures secure and smooth message processing, preventing delays and keeping workflows running across different parts of the system. SNS provides real-time notifications, allowing instant communication with multiple services or users. Together, these tools improve reliability, reduce risks of system failures, and support easy scalability.

By using ELB, SQS, and SNS in your system design, you prepare your business to succeed in a fast-changing digital world. These services are more than tools—they drive innovation, reliability, and long-term growth.

Call to Action

Ready to build a scalable system? Explore AWS ELB, SQS, and SNS today—and future-proof your applications!

References

These are the references that will be helpful to get to know more about this concept:

  1. AWS practitioner course in coursera

  2. https://aws.amazon.com/blogs/aws/queues-and-notifications-now-best-friends/

These two are wonderful resources to learn these concepts.

Why I Share This

Simon Squibb believes that the best way to share knowledge is to make it simple and accessible. That’s exactly what I do—I break down complex technology into something easy and exciting.

Tech should inspire you, not intimidate you.

Imagine a world without machine learning—every company would need to manually analyze massive datasets just to extract insights. Deep learning changed that game. It enables anyone with data to uncover patterns and build intelligent systems without relying solely on traditional methods.

I share knowledge this way because I want you to feel that excitement too.

If this post made you think differently about tech, check out my other blogs. Let’s make tech easy and exciting—together! 🚀