π Day 15 | AWS SNS & SQS β Messaging Services in AWS π
Today, I learned about AWS SNS (Simple Notification Service) and AWS SQS (Simple Queue Service), which are core messaging services used in AWS & DevOps architectures for communication between applications and services.
These services help in building decoupled, scalable, and reliable systems.
π AWS SNS & π¦ AWS SQS (DevOps β Point to Point)
π AWS SNS (Simple Notification Service)
Service Type
- Push-based messaging service
Main Purpose
- Used to send notifications and alerts
Messaging Model
- Publish / Subscribe (Pub-Sub)
Flow
Delivery
- Message is pushed automatically to subscribers
Subscribers Can Be
- SMS
- AWS Lambda
- HTTP / HTTPS
- SQS
Message Storage
- SNS does not store messages
- If the subscriber is unavailable, the message is lost
Use in DevOps
- CloudWatch alarms
- Deployment notifications
- System failure alerts
Scalability
- Fully managed and highly scalable
Interview One Line
SNS is used to send real-time notifications to multiple subscribers.
π¦ AWS SQS (Simple Queue Service)
Service Type
- Pull-based message queue service
Main Purpose
- Used to decouple applications
Messaging Model
- Queue-based
Flow
Message Retrieval
- Consumer polls (pulls) messages from the queue
Message Storage
- Messages are stored safely until processed
Visibility Timeout
- Message is hidden while being processed
Types of Queues
-
Standard Queue
- High throughput
- At-least-once delivery
-
FIFO Queue
- Ordered processing
- Exactly-once delivery
Use in DevOps
- Background jobs
- Auto Scaling workloads
- CI/CD task handling
Interview One Line
SQS is used to store messages and process them asynchronously.
π SNS vs SQS β Point to Point Difference
| Feature | SNS | SQS |
|---|---|---|
| Message Type | Push | Pull |
| Purpose | Send notifications | Store & process messages |
| Consumers | Multiple subscribers | One consumer per message |
| Storage | No | Yes |
| Use Case | Alerts & notifications | Task & job processing |
π SNS + SQS Together (DevOps Use Case)
- Application sends message to SNS
- SNS topic fans out the message
- Multiple SQS queues receive the message
- Each service processes independently
π Used in Microservices Architecture & CI/CD Pipelines
β Final Interview Line
SNS is for sending messages, SQS is for queuing messages until they are processed.
Thank You
π Connect With Me
| π Platform | π Link |
|---|---|
| π GitHub | https://lnkd.in/d2F3JPa3 |
| βοΈ Dev.to Blog | https://lnkd.in/dNtgqAME |
| πΌ LinkedIn | https://lnkd.in/d3NctxFT |
| π Resume (Google Drive) | https://lnkd.in/dHDNsd_D |
Top comments (0)