Ravindra BagaleCourses & study guides मराठी Track your progress

Chapter 17: Scaling

17.12 When class ends

A group left at desired 2 or 3, a t3.small you did not change back, and an AMI with its snapshots, all stay after you close the laptop.

Scale in when CPU falls, so the extra instances go away. Set a maximum (here 3) so one stuck alarm cannot launch forever. Right-size: do not jump t3.micro to a huge type for one slow hour. A larger type left overnight is that larger type all night. Horizontal scaling can return to 1 when CPU falls. The vertical change returns only when you stop the instance and pick the original type.

Deregister a lab AMI you do not need, and delete the snapshots that belonged to it (Chapter 14). Deleting the instance does not delete those copies.

When class ends, do this list. A larger type left overnight is that larger type all night. Horizontal scaling can return to 1. The vertical change does not, until you change it back.

  1. Run pkill yes if a burn is still running.
  2. Open the Auto Scaling group.
  3. Set minimum to 0.
  4. Set desired to 0.
  5. You should see the instances go away. If you delete the group instead, choose terminate.
  6. If any instance is still t3.small, stop it.
  7. Change it back to t3.micro.
  8. Start it.
  9. Delete alarm cpu-high-lab.
  10. Delete alarm cpu-low-lab.
  11. Delete the SNS subscription.
  12. Delete topic scale-lab-alerts.
  13. Delete the load balancer and the target group if the lab is over.
  14. If you do not need the lab AMI, deregister it.
  15. Delete the snapshots that belonged to that AMI.
  16. You should see desired 0 or no group, type t3.micro, and no forgotten lab AMI.

Lab

Chala, before you close the laptop, read the screen.

  1. Read desired. It must be 0, or the group must be gone.
  2. Read the instance type. It must be t3.micro.
  3. Open AMIs. The lab image must be gone if you do not need it.
  4. Open snapshots. The copies of that AMI must be gone too.