# Resource Groups (AWS)

## Overview

The **Resource Group** is the intelligence and organization layer of the Autofix module. It allows for the segmentation of cloud infrastructure into logical sets, serving as the foundation for applying all other automations, such as Smart Stop, Scheduled Scaling, Auto Tags, and Tag Manager. The objective is to ensure that automation policies are applied in a structured, scalable, and secure manner.

## Business Objective

Managing automations in complex environments with multiple accounts and regions requires precise segmentation. Without structured grouping, an organization faces several challenges:

* **Inconsistency:** Applying rules to incorrect resources.
* **Maintenance Complexity:** Difficulty in updating policies on a resource-by-resource basis.
* **Operational Risk:** Lack of isolation between Production and Development workloads.
* **Lack of Standardization:** Fragmentation of governance criteria.

***

## How It Works: The Scope Layer

The Resource Group acts as a reusable scope. Once defined, it can be associated with several automation rules simultaneously.

#### Identification Criteria

Segmentation is dynamic and uses multiple parameters to group resources:

* **Cloud Context:** Filtering by specific Accounts and Regions.
* **Metadata (Tags):** Grouping based on keys and values (e.g., `Environment: Dev`).
* **Direct Identifiers:** Selection by Resource Name or Resource ID.

***

## Configuration Process

Creating a group in the **Autofix → Resource Group** module follows a simplified workflow:

1. **Identification:** Defining a clear and objective name for the group.
2. **Scope Selection:** Choosing the Accounts and Regions the system should scan.
3. **Criteria Definition:** Configuring filters (Tags, Names, or IDs) that determine which resources belong to the group.
4. **Association:** Once saved, the group becomes available as a "target" for Smart Stop, Scaling, and Tagging rules.

***

## FinOps Impact

Efficient grouping is a maturity accelerator in FinOps:

* **Governance Scalability:** Allows for the application of consistent policies across thousands of resources at once.
* **Operational Risk Reduction:** Ensures automation isolation, preventing shutdown or scaling actions from affecting critical workloads.
* **Management Efficiency:** Simplifies long-term maintenance; by changing a Resource Group, all automations linked to it are updated automatically.

***

## Best Practices

* **Tag Standardization:** Base your groups on corporate tags whenever possible to maintain fidelity to the Organizational Map.
* **Granularity:** Avoid excessively broad groups that mix different types of workloads (e.g., mixing database instances with web servers).
* **Clear Naming:** Document the group's purpose within the name itself (e.g., `GRP_DEV_SAO_PAULO_APP_WEB`).
* **Periodic Review:** Validate whether the group criteria still align with the organization's current inventory.

***

## For use and access in the Pier platform:

With Resource Group, it is possible to establish a rule for service types and sizes to be active when the rule is applied.&#x20;

The system allows to select which services will be part of this list, associate them with an account, region, and establish schedules for when the rule will be applied.

**How to get to the Resource Group**

1. In the Autofix side feature menu, select **Resource Groups**.

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2FZDX1EzlvoHbXKB3no6es%2Fimage.png?alt=media&#x26;token=b8c4d6c9-42ee-468a-9a69-c1c0aa937946" alt=""><figcaption></figcaption></figure>

2. Select the **Groups or Schedules** feature:

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2Fp4yzzJtcPbdRRuWnscPJ%2Fimage.png?alt=media&#x26;token=fc266e87-e19d-4dc7-b2d2-93a4b72f967f" alt=""><figcaption></figcaption></figure>
