> ## Documentation Index
> Fetch the complete documentation index at: https://cloud-architect.ipoint-labs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Setting Up AWS Budgets and Alerts for Cost Management

> Hands-on lab · 45m

Launch this lab in the IP Lab Portal, then follow the steps below in the AWS console.

<a className="ip-lab-portal-btn" href="https://labs.intellectualpoint.com/labs/setting-up-aws-budgets-and-alerts-for-cost-management" target="_blank" rel="noreferrer">
  Open IP Lab Portal
</a>

## Overview

#### Lab details

1. This lab walks you through how to effectively manage your AWS spending by setting up budgets and configuring alerts to monitor your usage and costs.
2. Duration: **1 hour**
3. AWS Region: **US East (N. Virginia) us-east-1**.

#### Introduction

#### What is AWS Budgets?

* AWS Budgets is a powerful tool provided by Amazon Web Services (AWS) that enables users to set custom cost and usage budgets to manage their AWS spending effectively.
* With AWS Budgets, users can monitor their AWS usage and costs, set budget thresholds, and receive alerts when spending exceeds predefined limits.
* This proactive approach to cost management helps organizations avoid unexpected charges, optimize resource usage, and maintain financial control over their AWS infrastructure.

#### What is SNS:

* Simple Notification Service (SNS) is a fully managed messaging service provided by AWS that enables users to send messages or notifications to distributed systems or individuals.
* SNS topics serve as communication channels through which messages are published and delivered to subscribed endpoints or clients.
* SNS topics support various protocols for message delivery, including email, SMS, HTTP/S, and AWS Lambda functions. By creating SNS topics, users can facilitate seamless communication and notification workflows within their AWS environments, enhancing automation, monitoring, and alerting capabilities.

#### Architecture diagram

<img src="https://mintcdn.com/ip-cloud-architect-pathway/sjxZZnuQfFzzjiqS/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/001.jpg?fit=max&auto=format&n=sjxZZnuQfFzzjiqS&q=85&s=e395104517147ee50b5c6f5cd2a55c49" alt="" width="1112" height="512" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/001.jpg" />

#### Task details

1. Sign in to AWS Management Console
2. Create AWS Budget service
3. Configuring Budget Details
4. Configure Alerts
5. Create SNS service
6. subscribing to the Topic
7. Validation of the labs
8. Deleting AWS resource

#### Launching the lab environment

1. To Launch The Project Environment, Click On The **Launch lab** Button.
2. Please Wait Until The Cloud Environment Is Provisioned. It Will Take Less Than A Minute To Provision.
3. Once The Project Is Started, You Will Be Provided With **IAM User Name, Password, Access Key,** And **Secret Access Key**.

<Note>
  You can only start one Project at any given time
</Note>

## Lab guide

#### Lab steps

#### Task 1: Sign in to AWS Management Console

1. Click On The **Open console** Button, And You Will Get Redirected To AWS Console In A New Browser Tab.
2. On The AWS Sign-In Page,

   * Leave The Account ID As Default. Never Edit/Remove The 12 Digit Account ID Present In The AWS Console. Otherwise, You Cannot Proceed With The Lab.
   * Now Copy Your **User Name** And **Password** In The Lab Console To The **IAM Username And Password** In AWS Console And Click On The **Sign In** Button.
3. Once Signed In To The AWS Management Console, Make The Default AWS Region As **US East (N. Virginia) Us-East-1**.

#### Task 2: Accessing the Billing and Cost Management dashboard

1. Sign in to the AWS Management Console using your AWS account credentials.

2. Navigate to the Billing Dashboard by clicking on your account name in the top right corner and selecting "**Billing and Cost Managemnt**" from the dropdown menu.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/sjxZZnuQfFzzjiqS/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/002.png?fit=max&auto=format&n=sjxZZnuQfFzzjiqS&q=85&s=92b401e4f8118cbc05c9debc534b615e" alt="" width="586" height="836" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/002.png" />

#### Task 3: Creating a new budget

1. On the Billing and Cost Management page, click the "Budgets" available under **Budgets and Planning** in the left panel.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/sjxZZnuQfFzzjiqS/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/003.png?fit=max&auto=format&n=sjxZZnuQfFzzjiqS&q=85&s=2c2aff2d627da40873dd3a8de2d9f4fe" alt="" width="438" height="254" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/003.png" />

2. Click on the "**Create a budget**" button to start setting up your new budget.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/sjxZZnuQfFzzjiqS/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/004.png?fit=max&auto=format&n=sjxZZnuQfFzzjiqS&q=85&s=e48012c7270a55eaa506fb804bf1802e" alt="" width="1220" height="397" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/004.png" />

#### Task 4: Configuring the budget details

1. Choose the budget step up **Customize (advanced)** and the budget types **Cost budget – Recommended** and then click on **next.**

<img src="https://mintcdn.com/ip-cloud-architect-pathway/sjxZZnuQfFzzjiqS/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/005.png?fit=max&auto=format&n=sjxZZnuQfFzzjiqS&q=85&s=a74d8c0732c3b676cc7dd9169ec912ef" alt="" width="1127" height="710" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/005.png" />

2. In details, Enter a name for your budget (e.g.,  AWS Spending).

3. In Set budget amount the budget period should be monthly.

4. Budget renewal type: **Recurring budget:**

* **Recurring budget:** Recurring budgets renew on the first day of every monthly billing period.
* **Expiring budget:** Expiring monthly budgets stop renewing at the end of the selected expiration month.

5. And the start month should be on your next month or current month. In this case, we will be selecting September month.

6. Budgeting method leave it as default: Fixed

<Note>
  *Under Enter your budgeted amount, you'll notice it displays last month's cost. To determine the budget health, you can enter the lesser amount to view the details.*
</Note>

> In our case, since it's displaying **$0.05**, we'll need to enter **$0.01** in order to receive a notification email from the budget service.

7. Enter your budgeted amount ($): $0.01

<img src="https://mintcdn.com/ip-cloud-architect-pathway/sjxZZnuQfFzzjiqS/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/006.png?fit=max&auto=format&n=sjxZZnuQfFzzjiqS&q=85&s=428939ab9e7054e85bc107e83f8ff32b" alt="" width="876" height="1232" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/006.png" />

z

8. In Budget scope option click on “**All AWS services (Recommended)**”.

* FYI: **Filter specific AWS cost dimensions** by selecting this option you can Select specific dimensions to budget against. For example, you can select the specific service "EC2" to budget against.
* By selecting **All AWS services (Recommended)** you Track any cost incurred from any service for this account as part of the budget scope.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/sjxZZnuQfFzzjiqS/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/007.png?fit=max&auto=format&n=sjxZZnuQfFzzjiqS&q=85&s=1c0ec2370fcd7d4c08ff9bbc18144c6e" alt="" width="829" height="569" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/007.png" />

9. Under Advanced options, select **Unblended costs** under **Aggregate cost by**.

10. Then click on **Next** button.

#### Task 5: Configure Alerts

1. Configure alerts to be notified when your spending exceeds certain thresholds.

2. Click on the Add an alert threshold

<img src="https://mintcdn.com/ip-cloud-architect-pathway/sjxZZnuQfFzzjiqS/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/008.png?fit=max&auto=format&n=sjxZZnuQfFzzjiqS&q=85&s=261894e0f655a8ade8f6043f5ff7c62e" alt="" width="956" height="540" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/008.png" />

3. In Alert#1 set the alert threshold to 50 percentage and trigger should be actual.

4. In the Email, recipients specify a valid email ID so that the recipients can get a notification when the threshold has been exceeded.

5. There are 3 methods to get notification. Email, SNS Alerts, and AWS Chatbot Alerts. Let’s choose **Email** and **SNS** to send alerts.

<Note>
  "**Actual**" in AWS Budgets refers to current spending or resource usage within your AWS account. It shows real-time costs incurred during a specific period, helping you track expenses against set budgets. This feature aids in managing and controlling your AWS spending effectively.
</Note>

<img src="https://mintcdn.com/ip-cloud-architect-pathway/sjxZZnuQfFzzjiqS/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/009.png?fit=max&auto=format&n=sjxZZnuQfFzzjiqS&q=85&s=482f5daedde6f40fd4145db89508ff26" alt="" width="884" height="1140" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/009.png" />

6. To add Alert#2: again click on the **+Add alert threshold** button to set the alert threshold to 80 percentage and trigger should be actual.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/sjxZZnuQfFzzjiqS/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/010.png?fit=max&auto=format&n=sjxZZnuQfFzzjiqS&q=85&s=841acc758e25cfdb57969bd48e297abf" alt="" width="872" height="1134" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/010.png" />

7. To add Alert#3: again click on the **+Add alert threshold** button to set the alert threshold based on the forecasted spending.

<Note>
  The budgeted forecast helps you plan your spending and allows you to proactively manage your AWS costs. If your actual spending starts approaching or exceeding the budgeted forecast, AWS Budgets will send you alerts, enabling you to take corrective actions to avoid unexpected overages.
</Note>

<img src="https://mintcdn.com/ip-cloud-architect-pathway/sjxZZnuQfFzzjiqS/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/011.png?fit=max&auto=format&n=sjxZZnuQfFzzjiqS&q=85&s=bb67bae1b5ade806cce77e3449c96736" alt="" width="878" height="1128" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/011.png" />

8. Now we are going to create an amazon **SNS** service to receive alerts from budgets. In this method, we are going to choose SNS to send alerts.

9. Click on **create a new one**. It will open the SNS service in a new tab.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/sjxZZnuQfFzzjiqS/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/012.png?fit=max&auto=format&n=sjxZZnuQfFzzjiqS&q=85&s=9203f30b38f7248bf25e4ecc3aa3ebff" alt="" width="1212" height="564" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/012.png" />

#### Task 6: Creating SNS topic

1. In the SNS page, click on **Create topic**.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/sjxZZnuQfFzzjiqS/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/013.png?fit=max&auto=format&n=sjxZZnuQfFzzjiqS&q=85&s=598b0c537af39745fed31d70df85ef6f" alt="" width="1222" height="315" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/013.png" />

2. Under Details

* Type: Select Standard
* Name: Enter mysnstopic
* Display name: mysnsnotification

<img src="https://mintcdn.com/ip-cloud-architect-pathway/iAkc8cvYvGsOYFCQ/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/014.png?fit=max&auto=format&n=iAkc8cvYvGsOYFCQ&q=85&s=a8ff1223801cb15f38817505e3084b9a" alt="" width="1222" height="443" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/014.png" />

3. Leave other options as default and click on Create topic button.

4. An SNS topic will be created.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/iAkc8cvYvGsOYFCQ/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/015.png?fit=max&auto=format&n=iAkc8cvYvGsOYFCQ&q=85&s=29055661eef2a9121fc429f64553fa4c" alt="" width="1222" height="412" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/015.png" />

#### Task 7: Subscribing to the topic

1. Once the SNS Topic is created, click on your topic.

2. Scroll down and click on **Create subscription** button in the **Subscriptions** tab.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/iAkc8cvYvGsOYFCQ/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/016.png?fit=max&auto=format&n=iAkc8cvYvGsOYFCQ&q=85&s=a87ce2d83d8941f31dca3e16ecb2caff" alt="" width="1222" height="364" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/016.png" />

3. Under Details

* Protocol: Select Email
* Endpoint: Enter your \<Mail Id>

<Note>
  Make sure to enter a valid email address because you will receive an SNS notification at this address.
</Note>

4. Click on **Create** **Subscription** button.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/iAkc8cvYvGsOYFCQ/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/017.png?fit=max&auto=format&n=iAkc8cvYvGsOYFCQ&q=85&s=a748237e36abee7bf47ae2f7a5c3a04f" alt="" width="1222" height="506" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/017.png" />

5. You will receive an email in your mailbox from SNS, if its not in the inbox, please check in Spam folder.

6. Click on Confirm subscription.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/iAkc8cvYvGsOYFCQ/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/018.png?fit=max&auto=format&n=iAkc8cvYvGsOYFCQ&q=85&s=0223384208e13a3677c356c9bb8e1a80" alt="" width="1222" height="391" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/018.png" />

7. Your email address is now subscribed to SNS Topic mysnstopic.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/iAkc8cvYvGsOYFCQ/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/019.png?fit=max&auto=format&n=iAkc8cvYvGsOYFCQ&q=85&s=97b0ac4b9980662e69c7ed23379ae77a" alt="" width="1080" height="494" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/019.png" />

8. You can unsubscribe to the SNS Topic at any time.

9. Go to your SNS dashboard and click on 'Topics' on the left side. You will be able to see the ARN on the right side. Copy the ARN for further use.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/iAkc8cvYvGsOYFCQ/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/020.png?fit=max&auto=format&n=iAkc8cvYvGsOYFCQ&q=85&s=25a49241d689558eb22d31f2f0a43cd8" alt="" width="1222" height="224" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/020.png" />

10. now click on the snstopic and click on the **Edit** button.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/iAkc8cvYvGsOYFCQ/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/021.png?fit=max&auto=format&n=iAkc8cvYvGsOYFCQ&q=85&s=ea5195dd9179964cd6ab84af0d7cbb3d" alt="" width="1222" height="324" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/021.png" />

11. Click on the **Access Policy - optional**. We're going to add the below policy.

12. On line 27 add a comma and paste the policy. Replace \<insert-ARN-here> with the topic ARN which we copied in step 9.

```
{
    "Sid": "AWSBudgets-notification-1",
    "Effect": "Allow",
    "Principal": {
      "Service": "budgets.amazonaws.com"
    },
    "Action": "SNS:Publish",
    "Resource": "<insert-ARN-here>"
  }
```

<img src="https://mintcdn.com/ip-cloud-architect-pathway/iAkc8cvYvGsOYFCQ/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/022.png?fit=max&auto=format&n=iAkc8cvYvGsOYFCQ&q=85&s=f12cc3e85157f65be4f48ee482969eae" alt="" width="1222" height="355" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/022.png" />

13. Once it done click on **Save changes**.

14. Now, navigate  back to your created Budget console tab.

15. Now copy the SNS topic ARN from the SNS service console, and paste it in your Amazon SNS alert and click on **Next** button.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/iAkc8cvYvGsOYFCQ/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/023.png?fit=max&auto=format&n=iAkc8cvYvGsOYFCQ&q=85&s=aebe40dbdd3e41275f59d27501815078" alt="" width="1220" height="564" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/023.png" />

16. In the **Attach actions - Options**, leave everything as default and click on **Next** button.

> **FYI:** A budget action allows you to define and trigger cost-saving responses to reinforce a cost-conscious culture. You have the option to attach actions that run whenever your alert threshold has been exceeded, such as stopping an EC2 instance from incurring any further costs. You can select the alerts to which you would like to attach actions, then define these actions.

17. Review everything what have you done and then click on create budget.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/iAkc8cvYvGsOYFCQ/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/024.png?fit=max&auto=format&n=iAkc8cvYvGsOYFCQ&q=85&s=afeea2d9bd39ac2c3b3011170fa2c3dc" alt="" width="1222" height="255" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/024.png" />

<Note>
  This step is only an example of how the budget details will be displayed. If you're unable to view the budget details while completing the lab steps, that's okay. The lab is functioning correctly.
</Note>

18. Then click on your create budget service there you can see the budget details

* "**Current vs. Budgeted**" compares what you've spent so far this month to what you planned to spend by this point. It helps you see if you're on track with your budget.
* "**Forecasted vs. Budgeted (MTD)**" compares what you're expected to spend for the rest of the month to what you planned to spend for the entire month. It helps you anticipate if you'll exceed your budget by month-end, so you can take action if needed.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/iAkc8cvYvGsOYFCQ/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/025.png?fit=max&auto=format&n=iAkc8cvYvGsOYFCQ&q=85&s=6631006cb25977cc02359521c46aa947" alt="" width="1222" height="332" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/025.png" />

19. Once the thresholds get exceed, you will get the email notifications.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/iAkc8cvYvGsOYFCQ/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/026.png?fit=max&auto=format&n=iAkc8cvYvGsOYFCQ&q=85&s=afba89838d1fefd0aa75287e6bdec6ab" alt="" width="1222" height="559" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/026.png" />

#### Task 8: Validation test

1. Once the lab steps are completed, please click on the **Check my work** button on the Right side panel.
2. This will validate the resources in the AWS account and display whether you have completed this lab successfully or not.
3. Sample output :

<img src="https://mintcdn.com/ip-cloud-architect-pathway/iAkc8cvYvGsOYFCQ/images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/027.gif?s=bf36b53819308ccb8a9b0ad368a1fbf5" alt="" width="1002" height="637" data-path="images/labs/setting-up-aws-budgets-and-alerts-for-cost-management/027.gif" />

<Tip>
  **Do you know?**

  One lesser-known aspect of AWS Budgets is its integration with AWS Lambda functions. You can use Lambda functions to automate actions based on budget alerts. For example, you can set up a Lambda function to automatically stop or terminate certain AWS resources when a budget threshold is exceeded. This level of automation can help enforce cost-saving measures and prevent budget overruns effectively.
</Tip>

#### Completion and conclusion

1. You Have Successfully Created Budget
2. You Have Successfully Configured Budget Details
3. You Have Successfully set up Alerts for the budgets
4. You Have Successfully Created SNS topic
5. You Have Successfully Created Subscribing to the Topic
6. You Have Successfully Validated The Lab.

#### End lab

1. Sign Out Of AWS Account.
2. You Have Successfully Completed The Lab.
3. Once You Have Completed The Steps, Click On **End lab** in the IP Lab Portal And Wait Till The Process Gets Completed.

## What gets checked

When you press **Check my work**, the platform verifies each of these:

* **Create an Amazon SNS Topic** — Check If SNS Topic created or not
* **Create Budget** — Check whether a budget is created or not

## Related help

* [FAQs and Troubleshooting](/aws-cp/support/faqs-and-troubleshooting)
