Amazon Simple Notification Service (SNS)
- SNS is a managed service that provides message delivery to subscribers.
- Publisher communicate asynchronously with subscribers by sending messages to a topic, which is a logical access point and Communication Channel
- Lets create an SNS Topic
- Now lets add some email subcriptions. Note: you need to confirm email subscriptions
- Use the topic admin alerts when your cpu is underused
Activity 2: Create an alert in AWS when your ec2 is overused
- Lets understand overusage
- When CPU utilization > 85% for the last 10 minutes
- Actions -> Reboot the System
- Notification -> Send the notification to your admin team.
- After creating the alarm, we can create artificial stress
- Install a tool called as ‘stress’
sudo apt install stress # amazon linux sudo amazon-linux-extras install epel -y sudo yum install stress -y
- Now run the command
stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 100m -v
- You will recieve email alert as well.