Its easy to login to the AWS console to spin up an instance to test your app. But it gets frustrating when you have do this over and over developing/testing automation scripts (Chef recipes or Shell scripts).
I wrote this simple script using AWS CLI to kill the current instance and spin up a new instance. Once i have the IP,I login via SSH to verify the results.
- kill: > autoscale.sh 0
- Spin a new instance: > autoscale.sh 1
-
- You can run this a few times until an IP is assigned to the new instance.