I have a fairly common (and functioning) Opsworks stack with an ELB, auto-scaling app servers, and a database. Trouble is, 99% of the time I just need one app server and don't need the ELB, yet I'm still paying for it. I'm looking for an easy way to turn off the ELB when it's not needed.
I think I need two scripts: one to delete the ELB and point my Route 53 domain to the single app server, and one to launch an ELB, hook it up to the app servers, and re-point my Route 53 domain to the ELB. (The good news is that I know precisely when I'll need more app servers, so I don't need to automatically detect when there are multiple app servers.)
I know enough about AWS to build my Opsworks stack with Chef scripts, but I'm very new to the AWS CLI. Is there an easy way to accomplish this? Do scripts like this already exist? Thanks!