AWS Best Practices for Cost-Effective Resources and Optimization

Continue our overview of AWS Cost Optimization best practices by looking at best practices that cover resources and their optimization.

Cost-effective resources

AWS Cost Optimization best practices continue by advising us to think holistically when choosing the resources for our landscapes.

COST 5: How do you evaluate cost when you select services?

Many different cost components can go into the total cost of ownership. This question is asking us to consider how we account for those things.

COST05-BP01 Identify organization requirements for cost: This best practice encourages customers to gather all their stakeholders and objectives for the cloud and then prioritize by the respective Well-Architected Pillar. Essentially, this just means figuring out what our trade-offs might be as we balance the cost equation.

COST05-BP02 Analyze all components of the workload: In another fairly obvious (but sometimes overlooked) step, this best practice says we should consider all our workloads.

COST05-BP03 Perform a thorough analysis of each component: When analyzing each part of our landscape or planned architecture, we need to be sure to view each aspect from all angles, including reliability, security, supportability, redundancy, and cost. We want a full spectrum of perspectives.

COST05-BP04 Select software with cost-effective licensing: When we have the option, open-source software may provide a less costly alternative. AWS offers many open-source offerings. Additionally, AWS recommends seeking out licensing plans that are outcome-based, as opposed to per-user or per-CPU-based.

COST05-BP05 Select components of this workload to optimize cost in line with organization priorities: Remember when we generated our priorities and needs list back in COST05-BP01, COST05-BP02, and COST05-BP03? Now, we can decide which AWS components and variants best match up with those priorities and needs.

COST05-BP06 Perform cost analysis for different usage over time: This best practice recommends that we do prioritization/cost/usage analysis over time rather than as a one-time event.

COST 6: How do you meet cost targets when you select resource type, size, and number?

COST06-BP01 Perform cost modeling: This best practice suggests that we should break out the spreadsheets and figure out what our costs might look like over time as our needs expand. Additionally, we can deploy test workloads and measure their performance and cost requirements.

COST06-BP02 Select resource type, size, and number based on data: Once we've modeled the costs and experimented with various options, we need to select which options we're going to use for our deployments.

COST06-BP03 Select resource type, size, and number automatically based on metrics: Where we can, we should use AWS methods, which can automatically manage the resource types. An example of this is S3 Intelligent-Tiering and EFS Intelligent-Tiering, which automatically adjust the underlying storage class based on the actual need and usage.

COST 7: How do you use pricing models to reduce cost?

AWS gives us many different options for pricing, and we need to properly consider which options work for our various use cases.

COST07-BP01 Perform pricing model analysis: Just like we did with the cost modeling in COST06-BP01 around the types of services and instances we use, we should also model costs based on which pricing strategy we might use. For example, we can do a what-if analysis around Reserved Instances, Savings Plans, 1-year versus 3-year plans, Spot Instances, and so on.

COST07-BP02 Implement Regions based on cost: Recall that pricing can differ by region. This best practice just says to choose regions with the best pricing, if you can.

COST07-BP03 Select third-party agreements with cost-efficient terms: Some organizations might contract with third parties for services like consulting or managing AWS resources. This best practice recommends that we think carefully about the terms of those agreements, making sure that we get terms that align with incentives and are tied to the value we expect to get.

COST07-BP04 Implement pricing models for all components of this workload: If we have resources that will be running all the time, we really should use Savings Plans or Reserved Instances. Additionally, we should do break-even analysis on a periodic basis to see if other ‘almost full-time’ workloads might benefit from Savings Plans or Reserved Instances.

COST07-BP05 Perform pricing model analysis at the management account level: It's best to view our cost picture at the management account level, where all the costs roll up. This will give us the most accurate and actionable view of our overall AWS spending.

COST 8: How do you plan for data transfer charges?

Data transfer is one of those items that can really surprise some organizations when they get their AWS bill. We need to consider ways we can estimate and minimize those data transfer charges.

COST08-BP01 Perform data transfer modeling: To avoid being surprised by data transfer prices, we should be sure we know what the data traffic looks like going in, out, and between our AWS resources and model those costs.

COST08-BP02 Select components to optimize data transfer cost: Certain wide-area-network designs and architecture decisions can have a positive impact on reducing transfer costs. For example, if we use an internet gateway to access the public endpoints of AWS services, there are no data charges. However, if we use a NAT Gateway, we are charged a per GB cost for data moving through that gateway.

COST08-BP03 Implement services to reduce data transfer costs: Some components can help minimize our data transfer costs. The Storage Gateway can be installed as a VM in our data center to locally cache files that might ultimately live in S3, thus avoiding a transfer at each access.

Manage demand and supply resources

Of course, part of our cost optimization process is managing our resources smartly. This best practice section asks us to think about how we'll do that.

COST 9: How do you manage demand and supply resources?

This section asks us to consider some ways we can implement scaling or other measures to use only the resources we need.

COST09-BP01 Perform an analysis on the workload demand: This best practice recommends that we watch the existing workload and figure out any seasonal or cyclical requirements. Some of these best practices are pretty obvious, and this is one of those.

COST09-BP02 Implement a buffer or throttle to manage demand: This best practice suggests that we consider design options that, if possible, allow us to control the flow of required resources rather than having to size for an erratic load. For example, we might be able to use an SQS queue to throttle the workload to a smaller and less costly EC2 instance type.

COST09-BP03 Supply resources dynamically: We have several options to meet demand without having to keep resources running in a “just in case” mode. The AWS Instance Scheduler can start and stop EC2 and RDS instances based on a time schedule. We could also use CloudFormation to deploy and tear down more complex temporary landscapes using various scheduling tools.

Optimize over time

Cost optimization is an ongoing task, so AWS wants to ensure that we follow a consistent and sustainable process.

COST 10: How do you evaluate new services?

New services are being delivered all the time from AWS, and some of those new options might give us more functionality for a lower cost. We therefore some way to evaluate these things periodically.

COST10-BP01 Develop a workload review process: Just as we've described in this course, cost management and optimization are not one-time activities. The real work occurs over time as we refine and improve our optimization methods. Rather than trying to remember this review periodically, it makes sense to bake this into some process, such as a monthly AWS invoice walk-through or a quarterly architecture review.

COST10-BP02 Review and analyze this workload regularly: This best practice just says that we should follow our periodic review process:

  Step 1: Define the process.

  Step 2: Do the process.

COST 11: How do you evaluate the cost of effort?

Automation is a popular way we can increase consistency and reduce costs. This section challenges us to maximize our use of automation.

COST11-BP01 Perform automations for operations: Anytime we have the option to automate something, that will almost always be the most cost-effective way to do that thing. This best practice reminds us that we should automate as much as possible using AWS services, third-party tools, or even outsourcing tasks if that is more cost-effective.


Let's test your knowledge of these best practices! Match the activity with the best practice it falls under.

Get hands-on with 1200+ tech skills courses.