0
0
AWScloud~30 mins

Reserved Instances and Savings Plans in AWS - Mini Project: Build & Apply

Choose your learning style9 modes available
Reserved Instances and Savings Plans Setup
📖 Scenario: You are managing cloud costs for a small company using AWS. You want to save money by using Reserved Instances and Savings Plans for your EC2 instances.
🎯 Goal: Build a simple AWS configuration that defines EC2 Reserved Instances and Savings Plans to reduce costs for your cloud infrastructure.
📋 What You'll Learn
Create a dictionary to hold EC2 instance types and their hourly costs.
Add a configuration variable to specify the number of Reserved Instances to purchase.
Calculate the total hourly cost after applying Reserved Instances discounts.
Add a final configuration to define a Savings Plan with a fixed hourly commitment.
💡 Why This Matters
🌍 Real World
Companies use Reserved Instances and Savings Plans to reduce cloud costs by committing to usage in advance.
💼 Career
Cloud architects and cost managers need to understand how to configure and calculate savings from Reserved Instances and Savings Plans.
Progress0 / 4 steps
1
Create EC2 instance types and hourly costs
Create a dictionary called ec2_instances with these exact entries: 't3.micro': 0.0104, 't3.small': 0.0208, 't3.medium': 0.0416 representing the hourly cost for each instance type.
AWS
Need a hint?

Use a Python dictionary with keys as instance types and values as hourly costs.

2
Add Reserved Instances purchase count
Create a variable called reserved_instances_count and set it to 3 to represent the number of Reserved Instances you want to buy.
AWS
Need a hint?

Just assign the number 3 to the variable reserved_instances_count.

3
Calculate total hourly cost with Reserved Instances discount
Create a variable called total_hourly_cost and calculate the total hourly cost for reserved_instances_count of 't3.small' instances applying a 40% discount on the hourly cost. Use the formula: total_hourly_cost = reserved_instances_count * ec2_instances['t3.small'] * 0.6
AWS
Need a hint?

Multiply reserved_instances_count by the hourly cost of 't3.small' and then by 0.6 to apply the 40% discount.

4
Define Savings Plan hourly commitment
Create a variable called savings_plan_hourly_commitment and set it to 0.025 to represent the fixed hourly commitment for your Savings Plan.
AWS
Need a hint?

Assign 0.025 to savings_plan_hourly_commitment to represent your Savings Plan commitment.