AWS EC2
Activity for userdata understanding
- Create an ubuntu instance with ssh (22) and http (80) open
- ssh into instance
sudo apt update
sudo apt install nginx -y
-
Navigate
http://<public-ip>
- To execute certain commands immedietly after ec2 instance creation we have user data/custom data
- Navigate to advanced details
AWS EC2 instance status checks
- overview: Refer Here
- System Status Checks
- Instance Status Checks
AWS EC2 instances – Default Monitoring
- AWS offers basic monitoring capabilities on all ec2 instances without any extra cost
- With these basic metrics we can view information
- cpu
- disk
- network
- Possible usecases
- We need to restart the machine if the cpu utilization is > 90% for last 10 minutes
- Every day at 10:00 AM start the ec2 instance and 7 pm stop the ec2 instance
- To acheive these we need to understand
- Cloudwatch
- Alarm
- Simple Notification Service
- Cloudwatch