> For the complete documentation index, see [llms.txt](https://docs.idea-hpc.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.idea-hpc.com/best-practices/budget/set-up-budget-per-project.md).

# Set up budget per project

On this page, we will demonstrate how to configure a budget for a given project and reject jobs if you exceed the allocated budget

## Create a new AWS Budget <a href="#submit-a-job-when-budget-is-valid" id="submit-a-job-when-budget-is-valid"></a>

Go to AWS Billing, click "**Budgets**" on the left sidebar and create a new budget

![](https://4178558898-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff38qThSa0Aa40txosxbS%2Fuploads%2FkpAxdgnojHFaHxhZNCgz%2Fbp_bugdet_pp_setup.webp?alt=media\&token=9ad4e593-8cff-4a45-b834-f4eff1177886)

Click "**Create Budget"** and choose **"Customize (Advanced)"** to create a **"Cost Budget"** and **c**onfigure the Period/Budget Scope based on your requirements.

<figure><img src="https://4178558898-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff38qThSa0Aa40txosxbS%2Fuploads%2F6J0TMKpIon5uFDMtQ7ng%2Fbp_bugdet_pp_ex.webp?alt=media&amp;token=c1e161c8-2e20-4bc9-b0f6-5a149ecc9bf6" alt=""><figcaption><p>Example of a project with a monthly budget of $3500</p></figcaption></figure>

{% hint style="info" %}
We recommend you to set up a email notification when your budget exceed 80%
{% endhint %}

## Map your AWS Budget to an IDEA project

You now need to map the AWS Budget to an IDEA project ([click here to learn more about project management on IDEA](/modules/cluster-manager/projects-management.md))

On your IDEA web interface, click "**Projects**" and "**Create a New Project**". Fill out the form and make sure to "**Enable Budget for this Project**". Enter the AWS budget name for your project (must match the name of your budget configured on AWS Budget)

<figure><img src="https://4178558898-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff38qThSa0Aa40txosxbS%2Fuploads%2FwmEitFxKlMB9OIxK2qWr%2Fbp_bugdet_pp_create.webp?alt=media&amp;token=a96b9ae3-f33d-4225-b00f-b61ff237b53f" alt=""><figcaption><p>Make sure the name match your AWS Budget</p></figcaption></figure>

You should now see the budget on your IDEA project. Make sure to select your project and click "**Actions**" > "**Enable Project**"

<figure><img src="https://4178558898-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff38qThSa0Aa40txosxbS%2Fuploads%2F2FnUfArDHcGYvG75LsYf%2Fbp_bugdet_pp_validate.webp?alt=media&amp;token=42bf8088-2c48-4d9c-b963-d63895eb9ff6" alt=""><figcaption><p>Validate your AWS Budget directly within IDEA</p></figcaption></figure>

## Map the project to a queue

Now that you have your IDEA project linked to AWS Budget created, you need to specify which queue(s) you want this configuration to apply. Navigate to [Queue Profiles](/modules/hpc-workloads/admin-documentation/queue-profiles.md)

Select the queue profile and click "**Actions**" > "**Edit Queue Profile**" then map your project to the profile.

<figure><img src="https://4178558898-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff38qThSa0Aa40txosxbS%2Fuploads%2FsqyRlSVxQ7UHqDsYUDBo%2Fbp_bugdet_pp_mapping.webp?alt=media&amp;token=2ef59930-ed3c-4010-ac88-7fe069c673d0" alt=""><figcaption><p>Your IDEA project is now applicable to all queues configured to "compute" profile</p></figcaption></figure>

## Test the integration

### Valid Budget

With a valid budget, job(s) will be submitted successfully

<figure><img src="https://4178558898-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff38qThSa0Aa40txosxbS%2Fuploads%2FGZ1u1WgzvBKERiFw6cFq%2Fbp_bugdet_pp_testqsub.webp?alt=media&amp;token=3088534b-ba32-4c3b-b46f-6887a770f7d4" alt=""><figcaption></figcaption></figure>

### Invalid Budget

Let's now pretend we ran out of money for a given budget.

<figure><img src="https://4178558898-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff38qThSa0Aa40txosxbS%2Fuploads%2FteX7X5a5T7FDqwILiYHa%2Fbp_bugdet_pp_testranout.webp?alt=media&amp;token=be35016f-7dde-4eb5-9114-4146bca3cd28" alt=""><figcaption><p>No money left for the project assigned to the queue</p></figcaption></figure>

Job submission will then be impossible on IDEA

<figure><img src="https://4178558898-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff38qThSa0Aa40txosxbS%2Fuploads%2F1Sl8mrTAzQEYrN8by3AR%2Fbp_bugdet_pp_testranout_nosubmit.webp?alt=media&amp;token=3ebb884a-89ad-484b-9d24-9349a735e9e8" alt=""><figcaption><p>Unable to submit job because of AWS Budget</p></figcaption></figure>

{% hint style="info" %}
Allow 15 minutes for IDEA to be fully in sync with AWS Budget
{% endhint %}

## Integration with [Virtual Desktop Interfaces](/modules/virtual-desktop-interfaces.md) <a href="#submit-a-job-when-budget-is-invalid" id="submit-a-job-when-budget-is-invalid"></a>

IDEA projects can be consumed by multiple modules. In a similar way where [HPC Workloads](/modules/hpc-workloads.md) will be rejected if a budget has expired, IDEA users won't be able to provision their [Virtual Desktop Interfaces](/modules/virtual-desktop-interfaces.md) until additional budget is available to them.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.idea-hpc.com/best-practices/budget/set-up-budget-per-project.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
