Optimize AWS Costs and Billing Alerts

Estimate an EC2 server, reduce idle costs, and add AWS billing alerts.

Introduction

30 Second Summary

Online services can keep charging after you close your laptop. Quiet overnight usage is easy to miss until the bill arrives.

In this project, you will use AWS Pricing Calculator to compare an always-on Amazon EC2 development server with the same server on a working-hours schedule. You will use AWS Budgets to add low actual-spend and forecasted-spend warnings across your account.

What You'll Build

You will open a shareable cost comparison where scheduled compute costs less while the same 30 GB storage cost remains visible.

By the end of this project, you'll have:

  • A before-and-after estimate that shows monthly and 12-month costs for the same development server under continuous or scheduled usage.
  • A shareable calculator link that brings both scenarios into future architecture reviews while exposing the persistent Amazon EBS storage cost.
  • An account-wide billing guardrail that emails you at a $1 actual-spend threshold or a $5 forecasted-spend threshold.
  • Secret Mission: Use AWS Cost Anomaly Detection to add an AWS managed monitor that flags unusual service-level spending through daily $1 email alerts.

Are there any prerequisites?

You need an AWS account with access to the AWS Management Console plus permission to view Billing and Cost Management and create budgets. You also need an email address for alerts plus a web browser.

Before We Start

This checkpoint commits you to comparing an always-on Amazon EC2 development server with a scheduled version. You will expose idle compute costs plus persistent Amazon EBS storage costs before adding account-level cost warnings.

Open the Cost Planning Tools

A cost plan protects your account only when the estimator is reachable. Its billing controls must also be reachable.

AWS Pricing Calculator models planned usage before deployment. The AWS Management Console gives you signed-in access to AWS Budgets through AWS Billing and Cost Management.

In this step, get ready to:
  • Reach the Add service page in AWS Pricing Calculator.
  • Access the Budgets page in Billing and Cost Management.
  • Confirm that your AWS identity can create budgets.
Open AWS Pricing Calculator

AWS Pricing Calculator gives you an immediate modeled comparison without launching a server. Reaching Add service proves the estimator is ready for the baseline in the next step.

  • Select the address bar in your current browser tab.
  • Enter https://calculator.aws/#/.
  • Choose Create estimate.

Good start. You can now see the Add service page where the baseline estimate begins.

Check Billing and Cost Management access

A modeled estimate predicts intended usage. The Budgets page is the control point for the account-level warnings you create later.

This permission check only confirms access, so it does not create or change any AWS resources.

  • Open a new browser tab.
  • Enter https://console.aws.amazon.com/cost-management/.
  • Complete the sign-in flow with the AWS identity you plan to use for this project.
  • Choose Budgets in the navigation pane.

If your identity has billing access, you can see the Budgets page with a Create budget control.

Confirm both tools are ready

Before you check, do you expect both controls to be available with your current AWS identity?

  • Switch back to the AWS Pricing Calculator tab.
  • Choose your browser's Back button.
  • Check that Create estimate is visible.
  • Choose Create estimate to return to the Add service page.
  • Switch back to the Billing and Cost Management tab.
  • Check whether Create budget is available on the Budgets page.

✔️ Create budget is available

That access check is complete. Your AWS identity can reach the estimator plus the billing controls needed for this project.

No estimates or budgets have been created yet. No AWS infrastructure has been deployed.

ⓧ Access is denied

Billing access can be fiddly because the available identity depends on how your AWS account is managed.

  • End the current AWS Management Console session.
  • Sign in with an AWS identity that has permission to view Billing and Cost Management.
  • Navigate to https://console.aws.amazon.com/cost-management/.
  • Choose Budgets in the navigation pane.
  • Confirm that Create budget is available before continuing.

Still blocked from Budgets?

  • Ask your AWS account administrator for permission to view Billing and Cost Management.
  • Ask your AWS account administrator for permission to create budgets.
  • Help me understand which AWS billing permissions I need.

Your calculator can reach the Add service page. Your Budgets page shows Create budget.

Your cost planning access is confirmed. Next, you'll model an always-on development server so its full-month cost becomes visible.

Price the Always-On Baseline

Your cost planning tools are accessible. Now you can model the development server before any infrastructure exists.

An always-on Amazon EC2 development server can look inexpensive until its full-month compute cost becomes visible. Its storage adds another part of the baseline.

AWS Pricing Calculator does not include Free Tier in estimates unless the calculator specifically calls it out. Expiring Free Tier benefits are excluded.

In this step, get ready to:
  • Define the description and Region for the baseline scenario.
  • Configure one shared Linux t3.micro instance for constant On-Demand use.
  • Add a 30 GB Amazon EBS volume to complete the controlled estimate.
Set the estimate scope

Every estimate needs a description that identifies its purpose. Its Region determines which location the calculator uses for pricing.

  • Switch back to the AWS Pricing Calculator tab from earlier.
  • Load the Amazon EC2 estimate page by entering https://calculator.aws/#/createCalculator/ec2-enhancement in your browser address bar.

You'll see the Amazon EC2 estimate page with fields for location and instance specifications.

  • Enter Always-on development server in the description field.
  • Set Location type to Region.

The scenario now has a recognizable name and a regional pricing scope.

  • Select US East (N. Virginia) as the Region.

The location section now shows US East (N. Virginia).

Configure the instance

The pricing model controls how the calculator treats compute usage. Expected utilization turns the selected instance into a monthly runtime assumption.

  • Keep Shared Instances selected.
  • Select Linux as the operating system.

The specification now models a shared Linux host.

  • Enter t3.micro in the instance search field.
  • Select t3.micro from the search results.

The instance specification now shows the T3 micro option.

  • Keep the instance count at one.
  • Choose Constant usage as the workload.

The calculator now models one instance with a predictable workload.

  • Select the On-Demand pricing model.
  • Set Expected utilization of EC2 instances to 100%.

The compute configuration now represents continuous monthly use.

Complete the baseline estimate

Amazon EBS adds storage to the model as a separate cost component. Optional calculator sections can introduce unrelated assumptions.

Leaving those sections empty keeps the baseline focused on one instance and one volume.

  • Select General Purpose SSD (gp3) as the Amazon EBS volume type.
  • Set Storage amount to 30 GB.

The storage section now models one 30 GB gp3 volume.

  • Leave Detailed monitoring costs empty.
  • Leave Data transfer costs empty.

The estimate remains focused on compute and storage.

  • Leave Elastic IP costs empty.
  • Leave Additional costs empty.

Before you save the estimate, do you expect an always-on server with storage to produce a zero or non-zero monthly total?

  • Choose Save and add service.
  • Choose View summary.

You'll see one Amazon EC2 line item named Always-on development server on My estimate. The page displays monthly and 12-month costs.

That's your baseline built. The always-on commitment is visible before deployment.

Why Is the Total Non-Zero?

AWS Pricing Calculator models the selected compute assumptions. It also includes the configured storage.

Free Tier is excluded unless the calculator specifically calls it out. Expiring Free Tier benefits are excluded from estimates.

This page is a planning estimate. You have not deployed an Amazon EC2 instance or Amazon EBS volume.

✔️ My estimate shows both totals

Your baseline is complete. My estimate shows monthly and 12-month costs for the Always-on development server scenario.

ⓧ I'd like to double check the configuration

A complete baseline has the following configuration.

  • The scenario name is Always-on development server.
  • The location type is Region.
  • The Region is US East (N. Virginia).
  • The tenancy is Shared Instances.
  • The operating system is Linux.
  • The instance type is t3.micro.
  • The instance count is one.
  • The workload is Constant usage.
  • The pricing model is On-Demand.
  • The expected EC2 utilization is 100%.
  • The EBS volume type is General Purpose SSD (gp3).
  • The storage amount is 30 GB.
  • Detailed monitoring costs are excluded.
  • Data transfer costs are excluded.
  • Elastic IP costs are excluded.
  • Additional costs are excluded.
  • Monthly and 12-month costs are displayed.

Missing the Estimate Line Item?

  • Confirm that you chose Save and add service after configuring Amazon EBS.
  • Choose View summary to return to My estimate.
  • Check that Always-on development server appears as the scenario description.
  • Help me check my AWS Pricing Calculator baseline.

Your baseline now captures the cost of continuous compute with its storage. Next, you'll reduce the runtime assumption to expose which costs change.

Model a Scheduled Server

Your always-on baseline in AWS Pricing Calculator now exposes the monthly plus 12-month cost of one Amazon EC2 development server. A duplicate lets you model a working-hours schedule without launching infrastructure.

A working-hours schedule targets idle compute. The comparison tests whether every modeled cost falls with runtime.

In this step, get ready to:
  • Duplicate the always-on baseline into a scheduled scenario.
  • Set expected EC2 utilization to 24%.
  • Produce a public comparison link containing both scenarios.
Duplicate the baseline estimate

Duplication keeps the original assumptions intact while giving you a second scenario to change. This isolates utilization as the variable in your comparison.

  • On My estimate, select the checkbox beside Always-on development server.
  • Choose Duplicate.

You should see a second Amazon EC2 line item. The copy protects your baseline while you test a different runtime assumption.

  • Open the duplicated line item by choosing its edit icon.
  • Replace the duplicate's description with Scheduled development server.

What Does Duplication Preserve?

The duplicated scenario carries the baseline configuration into the edit page. Only its description has changed so far.

  • The location type remains Region with US East (N. Virginia) selected.
  • The instance remains one shared Linux t3.micro.
  • The workload remains Constant usage with On-Demand pricing.
  • The volume remains 30 GB of General Purpose SSD (gp3) storage.
  • Detailed monitoring, data transfer, Elastic IP, and additional costs remain excluded.
Set the scheduled utilization

Expected utilization controls how much On-Demand compute time the calculator models. The project uses 24% to approximate a 40-hour working week.

  • Find Expected utilization of EC2 instances.
  • Replace 100% with 24%.
  • Choose Update.

You should return to My estimate with two named scenarios. Good progress. Your scenarios now differ only in expected EC2 utilization.

Still Seeing One Scenario?

  • Return to My estimate.
  • Confirm that Always-on development server still appears.
  • Repeat the duplication if Scheduled development server is missing.
  • Help me find my missing scheduled scenario.
Compare and share the estimate

Before you open the cost details, predict whether storage falls with compute.

  • Compare the compute cost details for Always-on development server and Scheduled development server.
  • Compare the storage cost details for both scenarios.

You'll see lower compute cost for Scheduled development server. Its 30 GB Amazon EBS cost remains in the estimate.

You've found the cost that scheduling leaves behind. Stopped compute avoids instance usage charges while provisioned storage continues to incur charges.

Why Does the Storage Cost Remain?

The schedule reduces expected instance runtime. The attached storage remains provisioned throughout the modeled month.

This distinction gives you a reusable optimization check. Separate runtime-dependent costs from persistent costs before accepting a savings estimate.

Shared Estimates Are Public

The word public deserves a pause. AWS stores shared estimates on public servers.

Your current scenario names contain no sensitive data.

  • Keep account IDs, credentials, customer names, and other sensitive data out of estimate descriptions.
  • Choose Share on My estimate.
  • Read the Public server acknowledgment.
  • Choose Agree and Continue.
  • Choose Copy public link.
  • Open a new browser tab.
  • Paste the copied link into the address bar.
  • Press Enter to load the shared estimate.

You'll see Always-on development server plus Scheduled development server with monthly and 12-month costs. Your comparison is now portable for future architecture reviews.

Does the Shared Estimate Look Incomplete?

  • Return to the original My estimate page.
  • Confirm that both scenario names appear.
  • Create a new public link after both scenarios are visible.
  • Help me fix my incomplete shared estimate.

Your two-scenario estimate now separates idle compute savings from persistent storage costs. Next, you'll turn that planning lesson into an account-wide warning with AWS Budgets.

Create a Billing Guardrail

Your AWS Pricing Calculator comparison now shows how a working-hours schedule reduces Amazon EC2 compute costs while Amazon EBS storage persists.

The estimate models intended usage. It cannot warn you when real account spend moves beyond the plan.

AWS Budgets adds account-wide monitoring inside the AWS Management Console. You will create alerts for recorded spend plus forecasted spend.

In this step, get ready to:
  • Create the AWS Learning Guardrail monthly cost budget.
  • Set an account-wide limit of $5 using unblended costs.
  • Configure Actual-cost plus Forecasted-cost email alerts.

What does this cost?

AWS Budgets monitoring plus notifications are free. Creating this guardrail deploys no AWS infrastructure.

Choose the cost budget type

A cost budget compares account charges with an amount you define. The advanced path gives you control over its scope plus alert thresholds.

  • Return to the Billing and Cost Management console from earlier.
  • Choose Budgets in the navigation pane.
  • Choose Create budget.
  • Choose Customize (advanced).
  • Choose Cost budget.
  • Choose Next.

You will see fields for the budget name, period, renewal type, budgeting method, plus budgeted amount.

Define the account-wide limit

A recurring fixed budget resets on the same schedule while keeping the same limit. Leaving filters unapplied makes the guardrail cover the whole account.

  • Enter AWS Learning Guardrail in the Budget name field.
  • Select Monthly for Period.

The form now identifies AWS Learning Guardrail as a monthly budget.

  • Select Recurring budget for Budget renewal type.
  • Select Fixed for Budgeting method.

The budget now renews automatically each month. Its limit stays at the same fixed amount.

  • Enter $5 as the budgeted amount.
  • Leave all filters unapplied.

The $5 limit now applies across the account.

  • Select Use unblended costs.

Why use this scope?

No filters keeps every service inside the guardrail. A charge from any AWS service can count toward the budget.

Unblended costs reflect the resource costs charged when usage occurs. This view suits individual account tracking.

  • Choose Next.

You will reach the stage where AWS Budgets asks for alert thresholds.

Add alerts and create the budget

An Actual alert evaluates charges already recorded for the account. A Forecasted alert evaluates where AWS expects the monthly total to finish.

  • Choose Add an alert threshold.
  • Select Actual.

The first alert now evaluates recorded account spend.

  • Select Absolute value.
  • Enter $1 as the threshold.

The first warning threshold is now set at $1 of actual cost.

  • Enter your email address for the Actual alert.

AWS Budgets now has a destination for the Actual-cost notification.

  • Choose Add an alert threshold.
  • Select Forecasted.

The second alert now evaluates the expected monthly total.

  • Select Absolute value.
  • Enter $5 as the threshold.

The second warning threshold is now set at $5 of forecasted cost.

  • Enter your email address for the Forecasted alert.
  • Choose Next.

The review should show a recurring monthly fixed budget of $5 with no filters. It should also show the two email alerts you configured.

  • Review the summary against the settings above.
  • Choose Create budget.

Your billing guardrail is now active. It watches account-wide spend without deploying infrastructure.

What do these alerts guarantee?

The budget is a warning system. It does not enforce a hard spending cap.

AWS Budgets information updates up to three times per day. Updates typically arrive 8 to 12 hours apart.

Billing data can arrive later. Costs can continue beyond a threshold before its notification reaches you.

Can't create the budget?

  • Confirm that both alerts use Absolute value thresholds.
  • Confirm that each alert has an email recipient.
  • Switch back to the billing-enabled identity from earlier if Create budget is unavailable.
  • Help me check my AWS budget configuration.

Before you check the Budgets page, what details do you expect the new row to show?

  • Return to the Budgets page in Billing and Cost Management.

You will see the AWS Learning Guardrail row with a monthly limit of $5 plus two configured alerts.

  • Select AWS Learning Guardrail to inspect its alert details.

You will see an Actual-cost email alert at an absolute $1 threshold. You will also see a Forecasted-cost email alert at an absolute $5 threshold.

Secret mission

Detect Unusual Spend Automatically

Fixed thresholds warn you when spending crosses a known limit. In this mission, you will add service-level anomaly detection that looks for unusual spending patterns and sends daily email summaries.

Clean Up Your Resources

Clean Up Your Resources

No AWS infrastructure was deployed, so there are no compute or storage charges to stop. AWS Pricing Calculator, AWS Budgets monitoring and notifications, plus the AWS managed Cost Anomaly Detection monitor add no usage charge.

Your options are keeping the guardrails active, pausing their email alerts, or deleting the project-created controls.

Resources you used:

  • An account-wide AWS Budget named AWS Learning Guardrail, including the Actual $1 email alert and Forecasted $5 email alert.
  • A Cost Anomaly Detection subscription named AWS Learning Daily Alerts with a $1 absolute threshold.
  • A project-created AWS services monitor named AWS Learning Anomaly Monitor, if you created it during the Secret Mission.

The AWS Pricing Calculator estimate is a planning artifact with no teardown step.

Keep everything running

No action is needed. Choose this option if you want ongoing warnings about actual, forecasted, or unusual AWS spending.

  • Keep AWS Learning Guardrail active with its two email alerts.
  • Keep AWS Learning Daily Alerts associated with the AWS services monitor.
  • Keep the copied public estimate link for future architecture reviews.
  • Expect no usage charge from these monitoring resources.

Pause - I'll come back to this later

Pause the email warnings while preserving the budget, monitor, and calculator estimate for later use.

  • Return to Budgets in Billing and Cost Management.
  • Select AWS Learning Guardrail.
  • Choose Edit.
  • Remove the Actual alert threshold.
  • Remove the Forecasted alert threshold.
  • Choose Next after each page.
  • Choose Save.

Your monthly budget remains in place without its two email warnings.

  • Choose Cost Anomaly Detection in Billing and Cost Management.
  • Select the Alert subscriptions tab.
  • Delete AWS Learning Daily Alerts.
  • Keep the copied public estimate link.

The budget and AWS services monitor remain available when you return.

Delete - I don't want to use this again

Remove the project-created billing controls when you no longer want these alerts. Your calculator estimate stays available because it is separate from Billing and Cost Management.

Deletion is permanent

Deleting AWS Learning Guardrail removes its associated notifications and subscribers. AWS cannot recover the budget after you confirm.

  • Return to Budgets in Billing and Cost Management.
  • Select AWS Learning Guardrail.
  • Choose Actions.
  • Choose Delete.
  • Choose Confirm.

That clears the budget with both associated email alerts.

  • Choose Cost Anomaly Detection in Billing and Cost Management.
  • Select the Alert subscriptions tab.
  • Delete AWS Learning Daily Alerts.
  • Select the Cost monitors tab.
  • Delete AWS Learning Anomaly Monitor only if you created it during the Secret Mission.
  • Keep the pre-existing AWS services monitor if AWS created it before this project.

AWS keeps a public Pricing Calculator link created in 2026 valid for one year. Cleanup is complete once the project-created budget, subscription, and optional monitor are gone.

Nice Work!

Nice Work!

Excellent work! You built a reusable AWS cost-control pack that compares an always-on Amazon EC2 development server with a scheduled version. Your account now has spending warnings without any AWS infrastructure deployed.

You've learned how to:

  • Build a shareable cost comparison in AWS Pricing Calculator. It shows monthly costs plus 12-month costs for the always-on scenario versus the scheduled scenario.
  • Cut idle compute by changing expected utilization from 100% to 24%. Identify Amazon EBS storage as a persistent cost when compute stops.
  • Create account-wide spend alerts in AWS Budgets. The budget tracks an Actual threshold of $1 plus a Forecasted threshold of $5. You also know that these alerts warn about spend without acting as a hard cap.
  • Secret Mission: Added pattern-based service spend monitoring with AWS Cost Anomaly Detection. Configured AWS Learning Daily Alerts to send daily summaries at a $1 absolute threshold.

Ready to quiz yourself?