# Start - Stop

## Overview

Start / Stop is an Autofix module feature developed to automate the operating cycle of cloud resources. Unlike *Smart Stop* (which acts based on technical idleness), Start / Stop operates based on defined schedules, making it ideal for environments with predictable usage hours. The central objective is to align infrastructure execution time with actual business needs.

## Business Objective

Many companies keep resources active 24/7 unnecessarily, creating what we call "availability waste". Start / Stop resolves this issue in scenarios such as:

* **Development and Sandbox:** Environments that only need to be active during developers' working hours.
* **Internal Systems:** HR applications or Intranets used only during business hours.
* **Testing and QA:** Resources that can remain turned off during weekends and holidays.
* **Operational Efficiency:** Immediate reduction of *compute* costs without daily manual intervention.

***

## Supported Resources

Start / Stop can manage the lifecycle of various services, including:

* **EC2:** Computing instances.
* **RDS:** Relational database instances and clusters.
* **Others:** Compatible resources according to the capabilities of each provider (AWS/Azure).

***

## How It Works: The Scheduling Cycle

Automation is configured through an intuitive workflow divided into three stages:

#### 1. Scope Definition

The user determines exactly which resources will be affected:

* **Geographic Filters:** Selection by specific Accounts and Regions.
* **Identification:** Locating resources via Tag, Name, or Resource ID.

#### 2. Action Definition

The command to be sent to the resource is configured:

* **Start:** Triggering (turning on) the resources.
* **Stop:** Shutting down the resources.
* *Note: It is common to create complementary rules (one to turn on at 08h and another to turn off at 18h).*

#### 3. Schedule Configuration

Definition of the operational calendar:

* **Days:** Selection of the days of the week (e.g., Monday to Friday).
* **Times:** Definition of the exact hour for the trigger.
* **Execution:** The system processes the action automatically according to the configured time zone.

***

## FinOps Impact

This functionality is one of the fastest ways to obtain ROI in FinOps projects:

* **Operational Cost Reduction:** Avoids paying for unused processing hours.
* **Financial Predictability:** Facilitates monthly savings calculations (e.g., turning off a resource on the weekend saves \~28% of the monthly cost).
* **Automated Governance:** Transforms cost policies into systematically applied technical rules.

***

## Best Practices

* **Safe Start:** Begin by applying rules in development or testing environments.
* **Control Tags:** Use tags to identify resources participating in the Start / Stop program, facilitating audits.
* **Mirrored Rules:** Always check if there is a corresponding "Start" rule for every "Stop" rule, preventing teams from being stalled at the start of the workday.
* **Schedule Review:** Periodically adjust schedules to reflect changes in time zones or team work shifts.

***

#### For use and access in the Pier platform:

Start - Stop is an Autofix feature where it is possible to automate the process of starting and stopping existing instances in the environment, based on a key and value.

**For AWS -** Start Stop currently covers 3 services: **EC2, RDS, and Redshift**.

**For Azure -** Start - Stop currently covers 2 services: **VMs and Databases**.

1. **Accessing Start-Stop**.&#x20;

In the Autofix side menu, select **Start-Stop**.

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2FbEl3080ohunbC0Kl4q5N%2Fimage.png?alt=media&#x26;token=c0821ef9-4353-4df1-a428-655baa97809c" alt=""><figcaption></figcaption></figure>

Select the service: **EC2, RDS or Redshift**

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2F3tXLbzN3GqkgnLOH5vOs%2Fimage.png?alt=media&#x26;token=34f0d856-3f87-4bfd-9a87-ecde9b8888ec" alt=""><figcaption></figcaption></figure>

For Azure context: Select the service: **VM or Database**.

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2FpVFTilTZwMC30y3bH2Lw%2Fimage.png?alt=media&#x26;token=16e77200-b33d-4b02-b064-963ec3bfd405" alt=""><figcaption></figcaption></figure>

2. **Creating an Action**.&#x20;

On the main screen, click the "**Add**" button

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2F6ObLP83xTRnYmh1GR4UK%2Fimage.png?alt=media&#x26;token=34553afd-87fe-4b82-8c7f-da3930f50b50" alt=""><figcaption></figcaption></figure>

3. **Properties**&#x20;

In properties, start the **Start - Stop** configuration process&#x20;

* Define the name of the action

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2FBe9mxX8nh4SE4eTR8A2W%2Fimage.png?alt=media&#x26;token=122f924f-9974-49ee-8363-742b2e2c9899" alt="" width="563"><figcaption></figcaption></figure>

* Define the region, more than one region can be selected. **(For AWS Context Only)**

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2FtUPj61qOWmacrDZbQcdH%2Fimage.png?alt=media&#x26;token=59c70d8b-e648-4774-9ddf-a99179d577eb" alt="" width="563"><figcaption></figcaption></figure>

* Select the account ID to which the action will be applied.

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2F5lGPnOO4K9i0ppjatyvI%2Fimage.png?alt=media&#x26;token=5015b972-59ac-425d-9bc4-1ba44e6ff5cb" alt="" width="563"><figcaption></figcaption></figure>

Click on continue to proceed with the creation.

4. **Filters**&#x20;

When you click the continue button, the system will advance to the filters screen, where it is possible to add the desired filters.

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2FePpPAG7Yt5cAnsDoGcvk%2Fimage.png?alt=media&#x26;token=bf6d57cd-f210-4279-822f-697b0263cee8" alt="" width="563"><figcaption></figcaption></figure>

The filters are where Autofix will locate the resources via key and value.

* In "Filter **Type**", it is possible to locate the resource in three ways: **tag, resource name, and resource id**. (<mark style="color:$warning;">**AWS context only; for Azure, only by Tag)**</mark>
* Define the expression **CONTAINS** and **DOES NOT CONTAIN**. (<mark style="color:$warning;">**AWS context only; for Azure, only CONTAINS)**</mark>

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2FuHPlJPyE9hmMrI6g45T6%2Fimage.png?alt=media&#x26;token=a57e305d-2d43-410c-b568-46100beebc2f" alt="" width="563"><figcaption></figcaption></figure>

* In key and value, add the resource identification so Autofix can find it.

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2FNrPB87TpzWLvcQRTvxEs%2Fimage.png?alt=media&#x26;token=8a5615cb-b0d8-4d9c-84ff-c93ab4942f7a" alt="" width="563"><figcaption></figcaption></figure>

* When adding, it is possible to view the filter of the created resource

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2FhZ0tgPzCHxrYg9OaGX58%2Fimage.png?alt=media&#x26;token=286d0e02-c0d4-4451-9ed0-d4aa72047808" alt="" width="563"><figcaption></figcaption></figure>

On the right, it is possible to **edit** and **delete** the filter already created.

5. **Schedule**

When you click the **continue** button, the system will advance to the schedule screen.

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2FiZRmlrIXunOZ18mzDHa4%2Fimage.png?alt=media&#x26;token=319e94d4-0530-46a7-9b70-e946334fe12d" alt="" width="563"><figcaption></figcaption></figure>

In the schedule, define the operating period for the rule.

* It is possible to define the days of the week when the resource will operate, as well as the time when the resource should be started and stopped.
* In the "**define different intervals for each day**" option, it is possible to customize the execution time for each day of the week.

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2F1SglfsFuVh13D8ZfNiwA%2Fimage.png?alt=media&#x26;token=01673537-b328-4087-b958-372054e33526" alt="" width="563"><figcaption></figcaption></figure>

* Set the resource's **timezone** so that there is no time difference.

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2FesFkrUNMnmBLad46IjZt%2Fimage.png?alt=media&#x26;token=4c70f29e-fb5f-47e8-8aac-d5bc47fd2eb4" alt=""><figcaption></figcaption></figure>

* It is possible to define operating exceptions for the rule, for days when the rule should not function.

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2FU9DqHRzzh3WFUddiCvn7%2Fimage.png?alt=media&#x26;token=526cf91c-dafc-4dfd-9069-1365b61caba2" alt=""><figcaption></figcaption></figure>

6. **View created action - AWS**

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2Fk1lgHqy1ouVywQMPMk54%2Fimage.png?alt=media&#x26;token=f7d4b25d-4114-47cd-8bff-f0afa0d7bb7f" alt=""><figcaption></figcaption></figure>

**View created action - Azure**

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2FCk2oi2d4cnuWhrqQyesn%2Fimage.png?alt=media&#x26;token=03b30808-297c-4b6e-bb79-a2e635f70990" alt=""><figcaption></figcaption></figure>

After creating the rule, the configuration is visible on the home screen, where it is possible to **turn off** the rule, **edit** and **delete** the created rule.

<figure><img src="https://1687673077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9sinLUl52lDK1vg6b8g%2Fuploads%2FrEDNABggiyk0HkhudKGn%2Fimage.png?alt=media&#x26;token=a8a4c863-42ba-45a5-885a-dc3342861a53" alt=""><figcaption></figcaption></figure>
