Combining metrics and Alarms
- Create an ec2 instance with ubuntu
- install a tool called stress
sudo apt update
sudo apt install stress -y
- Then we will use stress to increase cpu utilzation then lets take some action
stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 15m -v
- Try to figure out a way to restart ec2 when cpu utilzation > 80% for last 5 minutes




Scheduling starts and stops of ec2 instances
- Scheduling ec2 instances with tag env:dev to
- start ec2 instances on every weekday at 10:00 AM
- stop ec2 instances on every weekday at 5:00 PM

- In AWS if we have to perform activities on schedule
- AWS supports create a scheduler with EventBridge Refer Here and Refer Here
- TBD: We will solve this in next session
