# Backups and costs

> Optional snapshots, AMIs and patching, and a budget alert.

## Maintenance jobs

`scheduler_features` turns on optional jobs. Only `reconcile` is on by default.

| Option | Default | What it does |
|---|---|---|
| `reconcile` | `true` | Keep instance state in line with the schedule |
| `daily_snapshots` | `false` | Nightly EBS snapshot |
| `weekly_amis` | `false` | Full AMI every Sunday night |
| `monthly_amis` | `false` | Full AMI on the 1st of each month |
| `backup_cleanup` | `false` | Delete backups past their retention |
| `security_update` | `false` | Weekly security patches |
| `maintenance_timezone` | `Europe/Berlin` | Timezone for all jobs |
| `daily_snapshot_retention_days` | `7` | Days to keep daily snapshots |
| `monthly_ami_retention_days` | `30` | Days to keep monthly AMIs |

## Budget alert

```hcl
module "workspace" {
  source  = "douklar/agent-workspace/aws"
  version = "~> 2.0"

  cost_report = {
    enabled                  = true
    email_addresses          = ["you@example.com"]
    monthly_budget_limit_usd = 50
    alert_threshold_percent  = 80
  }
}
```

This creates an AWS Budgets alert; with the values above it emails at $40.
You pay AWS for the instance, storage, snapshots and the other resources in
your account.

## AMI export

With `ami_transfer.enable_export = true`, AWS VM Import/Export needs an
existing IAM role named `vmimport` that trusts `vmie.amazonaws.com`. After
apply, `terraform output -raw manual_export_latest_ami_example` prints the
command that starts an export.

Source: https://douklar.app/docs/agent-workspace/backups-and-costs (Agent Workspace docs, last checked 2026-10-17)
