Skip to content

Automated fixes (draft pull requests)

Automated fixes turn a savings recommendation into a draft pull request in your Terraform code. The Plutus GitHub App opens the pull request. Your team reviews it and decides whether to merge. Plutus never merges a pull request. AI can make mistakes, so review every pull request before you merge it.

The controls are on the Automated fixes card under Settings (/settings#automated-fixes).

Nothing opens until all of these are true. The card lists each one under Your setup and Set by Plutus, with a link to fix the ones that aren’t done, and its status line says why nothing is opening yet.

  1. The Plutus GitHub App is installed and connected to the account, and Plutus has confirmed the installation.
  2. Pull request automation is switched on, on the Code tab.
  3. At least one allow rule names your repositories.
  4. An admin has confirmed a repository mapping for the resource the recommendation is about, so Plutus knows the one place in one repository to change.
  5. The account is active and not over an enforced spend limit, and AI features are on (needed to choose live and for automatic opening).

Plutus only opens pull requests in repositories that are private, not forks and not archived.

Mode What it does
Off Plutus doesn’t prepare or open any pull request. A pull request Plutus is already writing when you switch to off still finishes.
Shadow Prepares and opens nothing yet. It works like off.
Live Plutus opens draft pull requests from savings recommendations in repositories your allow rules permit: on its own when automatic opening is on, and whenever an admin asks for one.

Live is the default. An account that hasn’t connected GitHub, switched pull requests on and added an allow rule gets nothing opened, because the checks above fail.

Choosing live from the card asks you to confirm, needs a verified email address, and is available once every item in the checklist is done. Moving to off or shadow needs nothing.

Open pull requests automatically is on by default and applies while the mode is live. Plutus then opens draft pull requests on its own for savings it finds. About every 30 minutes, it looks at active recommendations that a sync has seen in the last 7 days and that have a known saving above zero, highest saving first. Single changes and groups are ranked together by saving before the daily number and your plan’s allowance apply.

An admin can raise the floor with Minimum saving per fix on the card, from $0 to $100 a month. The default is $0, so any saving Plutus can price qualifies. A recommendation with no known saving isn’t opened automatically.

  • The limits below apply: the daily number, one open pull request per repository and your plan’s monthly allowance.
  • In the first 24 hours after you connect GitHub, Plutus opens at most one automatic pull request.
  • Plutus also caps how many automatic pull requests it starts across all accounts in an hour. When that cap is reached, a pull request waits for a later pass.
  • It doesn’t open a second pull request for a recommendation it already opened one for, alone or as one change of a group.
  • After you close a pull request with one change, Plutus doesn’t propose that same change again. After you close a grouped pull request, Plutus doesn’t propose its changes again for 30 days. Automatic opening also leaves a resource alone for 30 days after one of its pull requests is closed.
  • If an AI spend limit is reached, automatic opening pauses and the card says so. Admins can still ask for a pull request by hand.

Turning Open pull requests automatically off cancels automatic requests that haven’t started yet. A pull request Plutus is already writing still finishes. Turning off AI features also stops new automatic requests.

An admin can click Open a pull request on a savings recommendation on the Savings page. This works in live mode whether automatic opening is on or off. If AI features are off, Plutus uses only its rules-based fixes, without a model. A request by hand counts toward the same limits as an automatic one.

The automatic pass can put several small storage changes into one pull request. It groups gp2 to gp3 changes that apply without a restart and are defined in the same Terraform directory of the same repository, up to 8 changes per pull request, highest saving first. A directory with more than 8 is split into several groups. Resize changes are never grouped, so each restart gets its own pull request.

A group needs at least $1 a month combined, or your Minimum saving per fix if that is higher. The minimum applies to the group’s total, not to each change, so changes that save a few cents or dollars each can still open a pull request together. A group that doesn’t reach it isn’t opened. A change that can’t be grouped follows the per-change minimum on its own.

Grouping happens only in the automatic pass. Open a pull request on a recommendation always opens a pull request with that one change.

On the Savings page, each recommendation in a grouped pull request links to the same pull request, with a line such as “Pull request #5, with 3 other changes”.

Three limits apply to every pull request Plutus opens, whether it opened it on its own or an admin asked for it. Plutus checks all three before it starts a pull request. The daily number and the per-repository limit count pull requests, so a grouped pull request counts once. The monthly allowance counts fixes: each change in a pull request is one fix.

Limit What it counts Who sets it
Pull requests a day Pull requests opened in the last 24 hours, plus ones Plutus is still preparing An admin, from 1 to 10 (default 3), on the Automated fixes card
Open per repository Plutus pull requests still open in one repository, plus ones it’s preparing there Fixed at 1, not adjustable
Monthly allowance Fixes in pull requests opened in the current billing cycle, plus ones Plutus is still preparing Your plan

Each plan sets how many fixes Plutus may open for the account in one billing cycle. A fix is one change in a pull request: a pull request with one change uses one, and a grouped pull request with five changes uses five. Some plans have no limit. Plans & tiers lists the current allowance for each plan.

What counts toward it:

  • Every change in a pull request Plutus opened in the current billing cycle, including pull requests that were later closed. A change counts once GitHub has accepted the pull request.
  • Changes in pull requests Plutus is still preparing. Each holds a place until the pull request opens, then counts as opened, so nothing counts twice. A change dropped from a group before it opens stops counting.

What doesn’t count: shadow mode, and attempts that ended without opening a pull request.

If a group has more changes than the allowance has left, Plutus trims it to the remaining number, keeping the highest-saving changes. The changes left out stay on the Savings page with their savings. If what’s left no longer reaches the group minimum, the group isn’t opened.

When the allowance is used up, Plutus opens no more pull requests for the account until the next billing cycle. That applies to automatic opening and to requests by hand. Nothing else changes: recommendations and findings stay on the Savings page with their savings. A request by hand shows “This account has used its remediation fixes for this billing cycle. The allowance renews with the next cycle, or a higher plan raises it.”

The allowance renews when the account’s billing cycle rolls over. Moving to a plan with a higher allowance applies the new allowance from the next check. If Plutus can’t read the allowance, it opens nothing and asks you to try again shortly.

  • The Savings page shows a line such as “Fixes: 2 of 3 used this cycle” above the findings. Once the allowance is used up, the line says how many findings are waiting and what they would save together, that Plutus opens more when the cycle renews or on a higher plan, and links to See plans. The line isn’t shown on a plan without a limit.
  • The Billing page (admin role) shows Remediation fixes under Usage this cycle, next to tracked spend and ingested events, with the cycle’s dates. It reads Unlimited on a plan without a limit.

Plutus changes AWS resources defined in Terraform (.tf files, and terraform.tfvars or *.auto.tfvars for variable values). There are five kinds of change:

Kind AWS changes Opens
Resize An EC2 instance changed to the instance type a rightsizing recommendation names. On by default
Storage class An EBS volume, or an instance’s root volume, from gp2 to gp3. On by default
Setting change Multi-AZ turned off on an RDS database that an environment tag marks as not production. A storage-heavy DynamoDB table moved to the Standard-IA table class. A Lambda function’s memory lowered to the size AWS Cost Optimization Hub recommends. Off until an admin turns on Propose setting changes
Retention A CloudWatch log group that never expires given a 30-day retention. Off until an admin turns on Propose shorter log retention, then on an admin’s request only
Removal Deleting the Terraform block of an idle resource. See Removals. Off until an admin turns on removals

Propose setting changes and Propose shorter log retention are switches on the Automated fixes card. Turning on retention asks you to confirm, because applying a shorter retention deletes the log data older than the new window, and it can’t be recovered. Plutus never opens a retention pull request on its own, even with automatic opening on.

The Lambda memory change uses Cost Optimization Hub’s recommendation, so it needs the hub’s permissions on the AWS role and an account enrolled in the hub. The RDS, DynamoDB and log group changes need the role’s newer inventory permissions too. A role deployed before they were added proposes none of them until you re-apply it.

Only AWS pull requests open today. Pull requests for other providers, such as Google Cloud, Azure and Snowflake, are in preview: Plutus doesn’t open them until each provider has been checked against real accounts. Asking for one by hand shows “Prepared, not opened yet: this provider is in preview.” Recommendations and findings for those providers still appear on the Savings page as advice, with nothing changed in your code.

For resizes and storage class changes, Plutus finds the line to change with its own rules first. A model is used only when the rules can’t find it, and then only to choose the line: the new value always comes from the recommendation.

A removal pull request deletes the Terraform resource block of an idle resource. Applying it destroys the resource. Plutus builds removals for three findings:

Finding Deletes Opens
Unattached EBS volume aws_ebs_volume On an admin’s request only
Unused Elastic IP aws_eip On an admin’s request only
Load balancer with no targets aws_lb, aws_alb On request, or automatically when automatic removals are on

Plutus doesn’t build removals for idle NAT gateways, stopped instances or instance termination. Terminating an instance also destroys its root volume.

Removals are off until an admin turns on Propose removing idle resources on the Automated fixes card and confirms the warning. Open removals automatically is a second switch, off by default. It lets the automatic pass open removals for load balancers only, at or above the minimum saving. Turning removals off turns automatic removals off too.

Plutus checks the resource before it opens the pull request, and again before it writes it. The resource’s inventory row must have been seen in the last 3 days and must still be idle: a volume with no attachment, an address with no association, a load balancer with no registered targets. The repository’s branch protection must also have been checked recently and passed, whatever the account’s own setting for it. The exception is a private repository on a GitHub plan that has no branch protection, described below.

The change is made by a fixed rule, not a model. Plutus declines to open a removal when:

  • Anything in the same directory refers to the resource: another resource, a data source, a local value, an output, a module argument, a moved, import or removed block, or depends_on.
  • The block uses count or for_each.
  • prevent_destroy is set to anything other than false.
  • The block isn’t the type the finding names.
  • The directory is a module that something else calls.
  • The block can’t be cut cleanly, for example when it is the only block in its file.

The pull request is a draft. Its title and first line say that merging and applying it deletes the resource and what is lost: a volume’s data, an Elastic IP address that can’t be recovered, or a load balancer’s DNS name. Terraform takes no snapshot, and Plutus names no snapshot cost. The description asks you to run terraform plan and check that it shows exactly one resource to destroy.

A removal is never grouped and uses one fix of your monthly allowance. When you merge it, Plutus marks the finding done. When you close it, Plutus doesn’t propose the same removal again.

Repositories without branch protection on their plan

Section titled “Repositories without branch protection on their plan”

A private repository on GitHub’s free plan can’t have branch protection or rulesets. Plutus detects this from GitHub’s own answer and treats it as neither a pass nor a failure.

  • An admin’s request for a pull request, including a removal, still opens a draft pull request. Plutus only opens a draft on a new plutus/ branch and never merges, so a person still reviews and merges it.
  • Automatic removals aren’t opened in that repository.
  • Other automatic pull requests are unchanged. If your account requires branch protection on the Code tab, those repositories stay blocked.
  • Every pull request opened there says that nothing on GitHub stops the change being merged without review.

Plutus rechecks about daily, so an upgrade of the GitHub plan is picked up.

  • A branch whose name starts with plutus/, and one commit with the edit.
  • A title such as “Change instance_type on aws_instance.web from m5.xlarge to m5.large”.
  • A description listing the resource, the attribute, the current and new values and the recommendation ID, and what applying the change does.
  • For a gp2 to gp3 change, Plutus may also set iops and throughput in the same block, and the description explains why. It adds an attribute the code didn’t set, and says so.
  • A note when a model chose the line, and a note when the value is a variable default that a TF_VAR_ setting, a -var flag or a workspace variable may override.
  • A link, “View this finding in Plutus”, to the recommendation on the Savings page. Signed-out readers sign in first, and someone who isn’t a member of the account sees a no-access page. Plutus omits the link when it can’t build one. Titles and commit messages stay plain text.
  • A disclaimer: Plutus prepared the change automatically, AI can make mistakes, and Plutus didn’t run terraform plan. Review the diff and run terraform plan before you merge.

A pull request with one change carries no cost figures.

A grouped pull request has a title such as “Change volume_type to gp3 on 4 resources in infra/storage”, and its description has a table of every change with its recommendation ID and estimated monthly saving, the total, and a “Not included” list counting any changes Plutus found there but left out, by reason.

Every pull request is a draft. To reject a change, close the pull request.

A merge approves a change. It doesn’t change the resource until your pipeline applies the Terraform. Once a day, Plutus compares each merged change with the AWS resource inventory and records one result per change:

Result on the Savings page Meaning
Merged, applied The inventory, read after the merge, shows the new value: gp3 for a storage class change, the new instance type for a resize, or the resource gone for a removal.
Merged, not applied 21 days after the merge, an inventory read taken after that point still shows the old value. A later apply changes the result to applied.
Merged, cannot check The inventory can’t settle it, for example the resource was replaced, or its value is neither the old nor the new one.
Merged No check has finished yet. This includes the first 21 days while the old value is still there.

A grouped pull request has a result per change. The result is evidence that the change is in place, not a measured saving. The amount shown next to it stays an estimate, and no total changes. The impact summary on the Automated fixes card and the get_remediation_impact MCP tool report the same results.

For an organization connection with member accounts, a resource counts as gone only after a successful read of that same AWS account following the merge. A resource missing because its account was excluded or left the organization is reported as cannot check.

Every role can see the card. Only admins can change the mode, automatic opening, the daily number, the minimum saving and the two removal switches. On the card, what each setting does is behind the info button next to it. Every change is recorded in the activity log, for example Pull Request Mode Changed, Automatic Pull Requests Changed, Daily Pull Request Limit Changed and Pull Request Queued Automatically.