Application Integration on AWS

It is a suite of services that enable communication between decoupled components within microservices, distributed systems, and serverless applications.

  • Messaging
    • Amazon Simple Notification Service (SNS)
    • Amazon Simple Queue Service (SQS)
    • Amazon MQ - AWS version of RabbitMQ
  • Workflows
    • AWS Step Functions
    • Amazon Managed Workflows for Apache Airflow (MWAA)

Simple Notification Service (SNS)

Amazon SNS is used for building and integrating loosely coupled, distributed applications. SNS provides instantaneous, push-based delivery (no polling).

Fully managed Pub/Sub service for A2A(Application to Application) and A2P(Application to Person) messaging.

Publish/subscribe messaging, or pub/sub messaging, is a form of asynchronous service-to-service communication used in serverless and microservices architectures. In a pub/sub model, any message published to a topic is immediately received by all of the subscribers to the topic

SNS Concept

There are mainly three components included in the SNS concept.

  • Topics: It is how you label and group different endpoints that you send messages to.
  • Subscriptions: the endpoints that a topic sends messages to.
  • Publishers: the person/alarm/event that gives SNS the message that needs to be sent.

The below diagram explains the different use cases of Amazon SNS. SNS Example

Subscribers endpoints

  • HTTP, HTTPS
    • Subscribers specify a URL as part of the subscription registration.
  • Email, Email-JSON
    • Messages are sent to registered addresses as email (text-based or JSON-object).
  • SQS
    • Users can specify an SQS standard queue as the endpoint.
  • SMS
    • Messages are sent to registered phone numbers as SMS text messages.
  • Lambda, Application

Sample

  • Using CloudWatch create SNS topic
    • Eg: Trigger SNS topic if EC2 CUP utilizaion > 80%

Integrate AWS SNS with AWS S3 Events, get SNS notification on S3 file upload

Amazon Simple Queue Service (SQS)

  • 1 million requests free
  • Its serverless and pay per API call
  • A message queuing service
  • Amazon SQS provides queues for high-throughput, system-to-system messaging.
  • You can use queues to decouple heavyweight processes and to buffer and batch work.
  • Amazon SQS stores messages until microservices and serverless applications process them.
  • 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.
  • Topic
    • Short polling
    • Long polling

Amazon MQ

  • Amazon MQ is a managed message broker service for Apache ActiveMQ and RabbitMQ
  • Makes it easy to set up and operate message brokers in the cloud, so you can migrate your messaging and applications without rewriting code.

Step Functions

  • Coordinate multiple AWS services

Workflow

  • ETL services or Human Enabled WF

Reference