loading...
Cover image for AWS Cost Optimisation

AWS Cost Optimisation

helenanders26 profile image Helen Anderson Originally published at helenanderson.co.nz Updated on ・3 min read

The AWS Cost Optimisation pillar is concerned with effectively architecting systems at a minimal cost.

By following best practice, you can effectively control your AWS costs by:

  • Right-sizing services to meet capacity needs at the lowest cost
  • Saving money when you reserve instances
  • Using the spot market to save further
  • Monitoring and tracking service usage
  • Using Cost Explorer to optimise savings further

Tags and Cost Explorer
Trusted Advisor
S3 and Lifecycle Management
EC2
RDS
Useful Links


Tags and Cost Explorer

  • To make sure you know which projects or teams are using resources, use the Tag Manager.
  • Once this is set up you can use the Cost Explorer to check in on daily, monthly, and forecasted spend using filters for tags, service type and accounts.


Trusted Advisor

  • Periodically review what you are running and if you need it.
  • Trusted Advisor gives suggestions on Cost and Security Optimisations. Run it quarterly to see what can be improved.


S3 and Lifecycle Management

  • Each storage option comes with its trade-offs of Availability v Cost.
  • Use the Lifecycle Management to move data between storage classes as it becomes 'warm' and eventually 'cold' when it can be archived with Glacier or deleted entirely.
  • S3 Intelligent Tiering does this automatically when access patterns change and is ideal for data with unknown or changing access patterns.


EC2

There are four ways to pay for EC2 instances:

  • Dedicated Hosts - physical servers dedicated for your use.
    Use cases: Bring existing licenses with you or meet regulatory requirements to be on a physical server that is dedicated for your use.
    Cost: Highest

  • On-Demand - capacity per hour or per second.
    Use cases: Applications with short-term or unpredictable workloads that cannot be interrupted.
    Cost: Low cost and flexible.

  • Reserved Instances - provide a reservation to launch instances when you need them.
    Use cases: Applications with steady-state usage
    Cost: 75% off the On-Demand price, prepay to lock in the lowest possible price.

  • Spot Instances - request spare capacity for
    Use cases: Applications that have flexible start and end times.
    Cost: Up to 90% off the On-Demand price.



RDS

  • Use the 'standard' configuration when setting up to make sure you aren't overpaying by changing what is in the default settings.
  • Check to see if you have 'Provisioned IOPs' enabled when setting up as this comes with an additional cost. You may simply need General Purpose.
  • AWS supports the m family for general use, the r family, and t2 instance for burstable compute. Monitor your instance to make sure you have the right size and type.
  • Database instances are charged by the hour. Schedule start and stop times if the database is only used at certain times and consider Aurora Serverless for even more flexibility
  • When migrating data the cost for Data IN and between AZs is free, but data OUT incurs costs.


Optimising costs can be challenging, but by tracking usage through tags and using the tools provided by AWS to review what can be switched off or scaled-down this is much easier.

Useful Links


This post originally appeared on helenanderson.co.nz

Discussion

pic
Editor guide
Collapse
dmfay profile image
Dian Fay

It bears mentioning that reserved instances are now the old way of doing things on EC2, with the much more flexible savings plans meant to take their place. We looked into them a couple weeks back but concluded that our EC2 outlay was already low enough they wouldn't make much of a dent in it.

Collapse
dbanty profile image
Dylan Anthony

From what I’ve seen savings plans are a bit less efficient money-wise than reserved instances but much more flexible. Main pro is it works across all EC2 (and more importantly for me, ECS Fargate!!!) without having to specify instance type.

Collapse
helenanders26 profile image
Helen Anderson Author

Interesting! I saw the new Savings Plans announced and wondered what the real world impact would be. Thanks for sharing.

Collapse
Sloan, the sloth mascot
Comment deleted