A cost optimisation exercise should be conducted on all projects that run on AWS every 3 months at least. If the project needs it to be done more frequently, it should be done!
The general procedure that should be followed are
- Review the usage of all fixed resources in the project (EC2 instances, load balancers, EB environments)
- Review the family & type of instance based on it’s usage
- Review the need of the fixed resource and if there are any alternatives
- Review the possibility for savings plan/reserved instances implementation
Review usage of all fixed resource
Login to the AWS console and go through each of the following resources and answer the following questions
- EC2 Instances
- Load Balancers
- EB Environments
- Is the resource serving traffic and in active usage (it might have been accidentaly created, retried for usage of new resources etc)
- Is the resource being utilized effectivetly (atleast 50% of CPU & Memory usage on a weekly average unless it is the lowest size possible)
- Is there a chance of using a spot instance? (Is it critical and does it have a graceful failure - best candidates are load balances EB environments)
Review the family & type of instance based on it’s usage
- Is the instance of the optimal size based on it’s usage?
- Is the instance of latest family?
Review the need of the fixed resource and if there are any alternatives
- Can we convert this fixed resouce to a serverless alternative or deploy to S3 + Cloudfront or Amplify? The answer is generally yes for UI servers.
Review the possibility for savings plan/reserved instances implementation
- Is the resource consistently used for 730 hours a month?
- Do we forsee removing the resource in the next 1 year?
If the answer to question 1 is yes and question 2 is no, then we move forward with reserving capacity in the form of reserved instances or a savings plan.
Plan of action
Construct a plan of action with the following details to submit to the project manager / client for each action item after the review
- Method of approach
- Expected cost savings in USD
- Expected performance improvements (if applicable)
- Requirement from client (if applicable)