Phase 4: Security & Compliance

Reserved instances, savings plans & committed use discounts

Intermediate ~2 min read
Think of it this way A friendly analogy. Read this if the technical version feels dense. Show Hide

Imagine you're helping a big company that uses a lot of special computers online, like when you play a game with friends who are all in different places. These online computers cost money. A smart way to save is to plan ahead. Instead of paying for things one tiny bit at a time, you can sometimes tell the company that provides these computers, "Hey, I'm going to use a lot of your computer power for a long time, like a year or even three years!" Because you're telling them this, they give you a super good deal. It’s like getting a discount for being a loyal customer.

Think about taking the bus. If you only ride the bus once in a while, you just buy a single ticket each time. That's like paying for exactly what you use, right when you use it. But what if you know you're going to ride the bus every single day to school for the whole month? It would be silly to buy 60 separate tickets, right? Instead, you buy a monthly bus pass. The pass costs money upfront, but you can ride as many times as you want, and each ride ends up much cheaper than buying individual tickets. You committed to using the bus a lot, and in return, you saved a bunch of money!

That monthly bus pass idea is a bit like how grown-ups save money on those online computers. If a company knows they'll need a specific kind of online computer for a long time, they can "reserve" it. This is like buying a bus pass just for bus route number 5. This is called a "Reserved Instance." You commit to that exact computer for a year or three, and get a big discount. But if you later need a different computer – like needing to take bus number 7 – your bus 5 pass might not work, potentially wasting money. So, there are also more flexible options, like a city-wide bus pass that works on any bus route! These are called "Savings Plans" or "Committed Use Discounts." With these, you commit to spending a certain amount on online computers each month, and you can use it for different kinds of computers as your needs change.

So, when a Cloud Architect helps a company manage its online computers, they figure out if getting a "bus pass" for specific computers or a more flexible "city pass" for overall computer use makes sense. By choosing the right "pass," they can save a huge amount of money for their company – sometimes millions of dollars! This means the company can use that saved money for other cool stuff, like building new games or making amazing apps. It’s all about being smart with how you plan for the future.

Cloud providers offer significant discounts if you commit to using their services for an extended period, typically one or three years. This commitment model allows providers to better predict capacity needs and pass on substantial savings to you, moving beyond on-demand pricing to a more strategic, predictable expenditure. The primary mechanisms for achieving these savings are Reserved Instances (RIs), Savings Plans, and Committed Use Discounts (CUDs). Understanding these tools is crucial for a Cloud Architect to effectively optimize infrastructure costs and manage budgets.

Reserved Instances (RIs) were one of the earliest forms of commitment discounts. With RIs, you commit to using a specific instance type (e.g., m5.large), in a particular region, with a specific operating system, for a 1-year or 3-year term. In exchange, you receive a substantial discount compared to on-demand rates. While highly effective for stable, predictable workloads that rarely change, RIs can be inflexible. If your application's instance requirements change significantly (e.g., migrating instance families), your traditional RI might go unused, leading to wasted spend. Convertible RIs offer some flexibility to change instance families, but at a slightly lower discount.

Savings Plans (AWS) and Committed Use Discounts (GCP, Azure) evolved from RIs to offer greater flexibility. Instead of committing to a specific instance type, you commit to an hourly spend across a specific compute family or even across multiple services, regardless of the underlying instance type, size, or region (within certain boundaries). For example, an AWS EC2 Instance Savings Plan commits to an hourly spend on any eligible EC2 usage, while a Compute Savings Plan (AWS) applies across EC2, Fargate, and Lambda. GCP's CUDs work similarly, applying to various compute services like VMs or Cloud SQL. This spend-based commitment automatically applies the discount to any eligible usage, adapting to changes in your infrastructure much more gracefully than traditional RIs. They represent the modern, preferred approach for achieving significant and flexible cost savings on compute.

Key Takeaways

  • Commitment to cloud resource usage over time yields significant discounts from cloud providers.
  • Reserved Instances (RIs) offer deep discounts but are tied to specific instance types and configurations, making them less flexible.
  • Savings Plans (AWS) and Committed Use Discounts (GCP/Azure) provide a more flexible approach by committing to an hourly spend, applying discounts across a broader range of compute resources.
  • Longer commitment periods (e.g., 3 years) generally offer higher percentage discounts than shorter ones (e.g., 1 year).
  • Balancing guaranteed savings with the need for infrastructure flexibility is key to choosing the right commitment model.

Code Example

bash
aws savingsplans describe-savings-plans \
  --query "savingsPlans[*].{Id:savingsPlanId,Type:savingsPlanType,State:state,Start:start,End:end,Currency:currencyCode,RecurringPayment:recurringPayment,Term:term}" \
  --output table

How this code works

This command's job is to list and display the key details of any active AWS Savings Plans in an account, which are a core part of committed use discounts. It provides a clear overview of these cost-saving commitments, helping to assess their current state and impact on cloud spend.

The code achieves this by first calling aws savingsplans describe-savings-plans, which queries the AWS service responsible for managing Savings Plans. A crucial part is the --query option: it uses a special language called JMESPath to filter the raw data returned by AWS. Specifically, savingsPlans[*] selects all available plans, and then {Id:savingsPlanId, ...} renames and picks out only the most relevant fields like the plan's Type, State, Start and End dates, and RecurringPayment. This tailored selection prevents an overwhelming amount of information. Finally, --output table transforms the filtered data into a neat, human-readable table, making the details easy to review without sifting through complex JSON.