Good morning! `aws ec2 start-instances --instance-ids i-12345678900`
Good night! `aws ec2 stop-instances --instance-ids i-12345678900`
http://docs.aws.amazon.com/autoscaling/latest/userguide/sche...
But since a Lambda is a program, you can make the criteria as complex as you like.
Tag it with "shutdown=non-biz-hours", and "timezones=UTC-7,UTC+0,UTC+5:30" and your shutdown script can figure out when it's outside of business hours in all of those timezones and shut it down.
To implement it use autoscaling group of size of 1. Then change desired to 0 or 1 based on need.
Standard vs. Convertible: Convertible allows you to switch between instance families (like c3, m3, m4, i2, r3 etc...) but it requires you to make a 3yr commitment, commit to a specific AZ and doesn't offer the same level of savings you'd get with a 3yr standard, I think it's closer to the savings you'd get with a 1yr Standard RI. Standard RI's come in 1yr or 3yr commitments. You can choose between the default option of the "Regional Benefit" which allows you to apply the RI to any instance that meets the RI criteria in a given region or you can choose the "Capacity Reservation" option which requires you to commit to a specific AZ to guarantee your reservation. That's right, your 'reserved' instance isn't necessarily reserved in the case of an outage unless you commit to a AZ.
One benefit that you get with Standard RI's is that they can be applied to any size instance in the family for which you've purcahsed them. Amazon allows you to convert between nano, micro, small, large, 2xlarge etc. within an Instance Family (t2, c3, m3, r4 etc.) with Standard RI's and they apply these conversions automatically on your bill.
Then you also have to choose how you pay, no-upfront and all monthly (smallest capex), partial upfront/partial monthly or all-upfront (largest capex).
It's frustrating because it's so complex that it makes me hesitate. I never feel like I'm getting the best deal and it just feels like AWS is taking advantage of the market by making pricing impossible to decipher.
Does anyone have any good methods for determining how many RI's to purchase, how often etc?