I would like to know if it would possible to create an architecture with both reserved instance (RI) and auto-scaling group to serve web pages. The idea would be to have one RI serving 24/7 and launching on demand instances in an auto-scaling group when the CPU of the RI reach a threshold. The goal is to have a predictable cost (RI) and scale out solution with auto-scaling. Does it make sens ? Is it Possible ?
Thank you !
A Reserved Instance on AWS is a billing concept and does not apply to a specific Amazon EC2 instance.
Each hour, the AWS billing system looks at all EC2 instances that have been running in a particular AWS account. It then compares them with any Reserved Instances that have been purchased. It compares the following attributes:
For each EC2 instance that matches a Reserved Instance, no cost applies. This is because the cost has already been paid as part of the Reserved Instance purchase.
The Reserved Instance applies regardless of whether the instance was launched through Auto Scaling.
Therefore, if you have purchased one Reserved Instance and your Auto Scaling group launches instances that match the Reserved Instance (Type, OS, AZ), then one of the instances in your Auto Scaling group will be "free" (or rather, pre-paid) each hour.
If your Auto Scaling group has a minimum of 1 and a maximum of 4, then there will always be at least one EC2 instance running, so you would receive the benefit of the Reserved Instance. Any instances above 1 will be charged normally. It is recommend that you use Reserved Instances for any instance that will be running continuously.