An instance named shop-vl89f8 is running a web server. Its only security group is monitoring-sg-vl89f8, which the monitoring team relies on; it opens port 9100 to the office. The group web-sg-vl89f8 allows port 80 from anywhere and is not attached.
-
Keep the instance's id in
IDand its public IP inIP. -
Try the page with a three-second limit, then read the exit status:
shecho $? -
Give the instance the web group as well. It must keep
monitoring-sg-vl89f8. -
Fetch the page again and read the exit status.