# Amazon WorkSpaces Cost Optimizer

**Cost Optimizer for Amazon WorkSpaces** monitors the usage duration of a WorkSpace throughout the calendar month and automatically adjusts the WorkSpace's state to the most cost-effective billing option. While this is not a mandatory requirement, we strongly recommend installing and initially configuring it in **"Dry Run" mode**, which lists recommendations and actions without executing them.

This AWS service enables automatic switching of WorkSpaces between **Hourly (AUTO\_STOP)** and **Monthly Cost (ALWAYS\_ON)** modes on a monthly basis, ensuring optimized costs. In **"Dry Run" mode**, recommendations will be displayed in the WorkSpaces Manager Portal, but the suggested changes will not be applied.

For more details and deployment instructions, please refer to the link below:\
<https://aws.amazon.com/solutions/implementations/cost-optimizer-for-amazon-workspaces/>

{% hint style="warning" %}
Please ensure that you are in the correct region before deployment of Cost Optimizer.
{% endhint %}

{% hint style="info" %}
After deploying the **WorkSpaces Cost Optimizer**, two **S3 buckets** will be created:

1. **One bucket for logs** → This bucket includes `"logs"` in its name and is used for storing logs related to WorkSpaces usage and optimizations.
2. **One bucket for Cost Optimiser data** → This is the bucket **without "logs" in its name** and should be used to configure the **WorkSpaces Manager Configuration section**.
   {% endhint %}

In AWS, when deploying network configurations, there are typically two deployment templates based on the **existing network configuration** of the **VPC**, for which we have a different CloudFormation template:

* [Hub Template](https://docs.aws.amazon.com/solutions/latest/cost-optimizer-for-workspaces/launch-the-stack-hub-template.html)**:** A centralized network architecture where multiple spoke VPCs connect to a single central VPC (Hub).
* [Spoke Template](https://docs.aws.amazon.com/solutions/latest/cost-optimizer-for-workspaces/launch-the-spoke-stack.html): A peripheral VPC that connects to the Hub via a Transit Gateway or VPC Peering.


---

# Agent Instructions: 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:

```
GET https://docs.nuvens.cloud/install/installation-prerequisites/amazon-workspaces-cost-optimizer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
