Choosing the right event-routing service for serverless: EventBridge, SNS, or SQS

To Nha Notes | May 4, 2023, 3:05 p.m.

Serverless is synonymous with Event-Driven Architecture, where Events are a fundamental block of information that is passed around to execute certain application logic. It is very important that events are delivered to the right destination with expected behavior to make sure the whole serverless application works as one. Events are relayed from one place to another through communication services, either in sequence or in parallel.

AWS has a few communication services for event messaging with some overlapping features. The two services that first come to mind for most people are Amazon SQS and Amazon SNS.

Amazon SQS is the oldest and first service released in the Amazon Web Services cloud along with EC2 back in 2006. SQS is a queuing service mainly used to reliably store and process messages in sequence by a single service. Amazon SNS came later with a specific communication model, publishers, and subscribers. Recently, AWS added another major service, Amazon EventBridge. It is an extension to the existing service CloudWatch Events.

References

https://lumigo.io/blog/choosing-the-right-event-routing-on-aws-eventbridge-sns-or-sqs/

https://aws.amazon.com/blogs/compute/choosing-between-messaging-services-for-serverless-applications/