SNS(Simple Notification Service),AWS SNS
Table of contents
Amazon SNS is a highly available, durable, secure, fully managed pub/sub messaging service that enables you to decouple microservices, distributed systems, and event-driven serverless applications. Amazon SNS provides topics for high-throughput, push-based, many-to-many messaging.
Go to Simple Notification service
Create topic; Topic name MyTopiC
Type standard
Create topic
Name as Mytopic
Create topic
MyTopic created
Create subscription
Protocol Email
Create subscription
Status pending
See the Gmail
Confirm subscription
Subscription confirmed
Status confirmed
Example: Create IAM Role
Create a role
Trusted entity type; AWS service
Use case SNS; next
Next
Role name
Create role
See the ARN; copy ARN
Example; Create a SQS
Access policy; only the specified AWS account, IAM users and roles; paste the ARN
Create queue
Add a second subscription in SNS
Protocol; Amazon SQS and Endpoint [https://sqs.us-east-1.amazonaws.com/454836273704/Myqueue]
Create subscription
Subscription Added
Subscribe to Amazon SNS topic in SQS
Specify an Amazon SNS topic available for this queue; save
Publish message
Message details
Message body
Publish Message
Message received Gmail
Click send and receive messages
Poll for messages
Now message received in SQS
Example create an EC2 instance.
Here see that no alarm created in EC2 instance
Copy the instance ID
Example Go to Cloud Watch
All metrics
Search for any metric; here paste EC2 instance Id
Paste EC2 instance id
Choose EC2>Per-instance Metrics
Here see 17 metrics
Select CPU Utilization
Choose Graphed metrics
Choose bell icon for create alarm
Metric default
Conditions Greater/Equal 0; next
Send a notification to the following topic; Select an existing SNS topic; next
select an existing SNS topic
Alarm Name; CPU Utilization; next
Create Alarm
In alarm
Message received in Gmail
Message received in SQS
Now see alarm created in EC2
Subscribe to my newsletter
Read articles from Sundar blog directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by