SNS Vs. EventBridge Plus AWS Services for Popular Architectures


Guest post by Yan Cui, who is an AWS Serverless Hero, and independent consultant.

Hello Reader,

SNS & EventBridge share many capabilities and can be used interchangeably in many situations.

So, how do you know when to use which?

Instead of judging them solely by their difference in capability (which is an important consideration!) e.g. SNS has FIFO, it would be helpful also to consider their respective design choices.

This is subtly telegraphed in their respective limits and resource names.

Limits

SNS has a soft limit of 12,500,000 subscriptions per topic, and EventBridge has a hard limit of 5 targets per rule.

This limit is particularly relevant in 1-to-N communications, where you need to broadcast updates to many subscribers.

Topics vs. Event Buses

SNS has "topics", whereas EventBridge has "event buses".

Topics imply a singular focus. Subscribers of a topic should expect all the messages to be related to that topic.

Whereas an event bus has no such implied constraint and can take in events of all sorts.

SNS supports only a handful of targets, whereas EventBridge supports many more, including AppSync, ECS and Step Functions.

EventBridge can also ingest events from third-party vendors, transform the input for each target, and discover the schema of the ingested events.

Both are relevant when EventBridge is used as the central hub of N-to-N communication, facilitating message exchange between many different publishers and consumers.

This does not mean that SNS can't be used in N-to-N communication, only that it's not optimized for it.

Currently, SNS supports FIFO topics whereas ordering is not guaranteed for EventBridge.

Summary

Either SNS or EventBridge is fine in most simple use cases.

However, these subtle differences matter a lot when you scale the use case for the enterprise. Where, you need to cater to many different workloads across many teams and services with different technology stacks.

If you liked this and want to learn more about building serverless architectures on AWS, check out the Master Serverless newsletter at theburningmonk.com/subscribe. Yan shares weekly tips to help you become a better AWS developer in just 5 minutes a week.


🙏 Thank you Yan

Raj here 👋

AWS Services to Study for SA

I get this question a lot: What AWS services should you go deep on as an SA? The best way to approach this is to work backward from the most popular architectures and trends and map AWS services to them. I brought back my trusty whiteboard, explained the important architectures and trends, and mapped AWS services to them so that you can make a mental model and explain it better in the interviews. Here is the video:

video preview

Keep learning and keep rocking 🚀,

Raj

Fast Track To Cloud

Free Cloud Interview Guide to crush your next interview. Plus, real-world answers for cloud interviews, and system design from a top Solutions Architect at AWS.

Read more from Fast Track To Cloud

Hello Reader, Most engineers are using MCP clients and agents. But very few know how to build and host an MCP server, let alone run it remotely on the cloud. In today's edition, we will learn how to create and run a remote MCP server on Kubernetes, on Amazon EKS! I will share the code repo as well, so you can try this out yourself. But first.. 🔧 What is an MCP Server really? It’s not just an API that performs a task. An MCP Server is a protocol-compliant endpoint (defined by Anthropic) that...

Hello Reader, On my interactions, this question is coming up a lot - “How are AWS Strands different from Bedrock Agents?”. In today's newsletter, we will go over this, so you can also answer this in your interviews or real-world projects Let’s break it down using a practical example: What happens when a user asks an LLM app: What’s the time in New York? What’s the weather there? List my S3 buckets The LLM don't have these information, hence it needs to invoke tools for time, weather, and AWS...

Hello Reader, Another day, another MCP tool. But this one is special. Today we are going to go over newly released EKS MCP server. This is the official Kubernetes MCP server released and maintained by AWS. This one will rule them all! In today's edition, we are going to go over what it is, why this one is a game changer, how you can use this to get job interviews and demand more money, and whether it will eliminate SRE jobs. There are three Ways to Manage Kubernetes : Traditional Way (Manual...