TL;DR: Managing backup and recovery as Infrastructure as Code can reduce configuration drift, improve reproducibility, and make protection rules visible in version-controlled workflows, according to Commvault. For cloud teams, the real shift is governance: backup state becomes reviewable, enforceable, and easier to align with the rest of the stack.
At a glance
What this is: This is an analysis of using Terraform to define AWS backup policies as code, with the key finding that declarative protection reduces drift and makes backup state version-controlled.
Why it matters: For IAM, cloud, and platform teams, it shows how governance discipline in the infrastructure layer should extend to backup, because out-of-band protection changes create risk and audit gaps.
Context
Cloud protection is often treated as a separate administrative layer even when the rest of the environment is managed declaratively. That split creates a governance gap: infrastructure changes can be reviewed and reproduced, while backup policy changes remain hidden in console state, making it harder to prove what is protected and why.
In AWS environments that already use Terraform, backup policy as code extends the same control model to data protection. The identity angle is indirect but real: access to accounts, roles, and policy definitions determines who can alter recovery posture, so backup governance becomes part of the broader cloud IAM and change-control model.
The central issue is configuration drift, and the article argues that drift in protection policy is the problem code can solve better than manual administration. That is especially true in multi-account environments where consistency, reviewability, and repeatability matter more than one-off tuning.
Key questions
Q: What breaks when AWS backup is configured manually instead of as code?
A: Manual backup configuration breaks consistency and traceability. Teams can protect one account or service differently from another, newly created resources may miss coverage, and console-only changes are harder to audit or reproduce. In practice, the problem is not just operational inconvenience. It is that recovery posture becomes detached from the governed state of the rest of the environment.
Q: When does backup policy as code matter more than console-based administration?
A: It matters most when the environment is already defined and deployed as code, because backup should follow the same change-control logic. That is especially true when multiple AWS accounts, regulated workloads, or shared platform teams need consistent protection and evidence of how it was changed.
Q: How do you know if backup governance is actually working in AWS?
A: You know it is working when the declared policy and the live protection state match, when new resources inherit protection automatically, and when changes are visible in reviewable workflows. If backup settings still depend on individual console actions, governance is incomplete even if coverage looks adequate on paper.
Q: What is the difference between infrastructure as code and backup policy as code?
A: Infrastructure as code provisions the environment, while backup policy as code governs how that environment is protected and recovered. They are related but not identical controls. The key practitioner decision is whether recovery rules are managed with the same reproducibility, reviewability, and rollback discipline as the workloads they protect.
Technical breakdown
Why manual backup configuration drifts in AWS
Manual backup administration creates a second control plane outside infrastructure-as-code. Teams may provision EC2, IAM roles, and databases through Terraform, but then attach backup policies separately in consoles, which breaks reproducibility and obscures the intended state. Drift appears when one account or service is protected differently from another, or when an out-of-band change is never reconciled back to policy. The operational problem is not just scale, but traceability: without code, there is no durable record of how backup decisions changed over time.
Practical implication: treat backup configuration as a managed state, not an afterthought outside change control.
How declarative backup policies change governance
A declarative backup policy defines frequency, retention, scope, and resource matching in code, then lets the platform apply those rules consistently. That makes the backup posture reviewable in pull requests, versioned alongside application and infrastructure changes, and reproducible across environments. In governance terms, this moves recovery policy from operator memory to controlled configuration. The important technical shift is that the policy becomes a predictable artifact, so deviations can be detected and corrected the same way other infrastructure drift is handled.
Practical implication: place backup policy changes under the same review, approval, and rollback process as infrastructure changes.
Why tag-based protection scales across AWS accounts
Tag-based protection uses resource metadata to bind backup rules to groups of assets rather than to individual objects one by one. That matters because new resources inherit protection automatically when they match the tag condition, reducing manual assignment and shrinking the gap between resource creation and protection coverage. For multi-account AWS estates, this is how backup policy becomes operationally scalable. The technical value is not just convenience. It is consistent policy application across a changing fleet, with fewer missed assets and fewer human steps to audit.
Practical implication: standardise tagging if you want backup policy to follow resources automatically across accounts.
Threat narrative
Attacker objective: The practical objective is not breach exfiltration but weakening backup reliability so that recovery posture no longer matches the intended control state.
- Entry occurs when backup and protection settings are configured manually in the console instead of through a controlled declarative workflow.
- Credential or policy abuse is possible when different accounts and services end up with inconsistent protection rules and out-of-band changes.
- Impact shows up as configuration drift, delayed protection for new resources, and weaker confidence in what data is actually covered.
Breaches seen in the wild
- Codefinger S3 ransomware 2025: Codefinger used victims' compromised AWS keys to re-encrypt S3 buckets with SSE-C, set 7-day deletion and demanded ransom for the key.
- Commvault Metallic breach 2025: A nation-state actor exploited a Commvault zero-day in Azure and may have taken app secrets that open customers' Microsoft 365 tenants.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
Configuration drift is the real security problem here: when infrastructure is code but backup policy is not, the control model splits in two. That split weakens assurance because the organisation can no longer reason about protection state from the same system it uses to reason about deployment state. Practitioners should treat backup posture as part of the same governed lifecycle as infrastructure.
Backup policy as code creates auditability, not just automation: the important change is not that fewer clicks are required, but that recovery decisions become reviewable, versioned, and reversible. That is a governance improvement for cloud teams, because it turns protection settings into a change-controlled artifact rather than an operator-held configuration.
Tag-driven protection is a control pattern for scale: it lets policy attach to classes of resources instead of one-off assets, which is the only practical way to keep pace with elastic cloud environments. The named concept here is backup drift control, meaning the ability to keep declared protection aligned with the live estate as it changes.
Identity and access governance sits underneath the backup layer: whoever can change policies, tags, or account connections can alter recovery outcomes. That makes backup administration part of the broader IAM and change-management surface, especially in multi-account AWS environments where delegated access is common.
Cloud teams should stop treating recovery posture as a separate admin domain: in modern environments, the control that provisions infrastructure and the control that protects it need the same governance discipline. If the policy cannot be reviewed in code, it is already too easy to drift.
What this signals
Backup drift control is becoming a practical cloud governance requirement, not a narrow storage concern. Once infrastructure is declarative, protection policy that lives elsewhere becomes an avoidable source of inconsistency, especially in multi-account AWS estates.
The more an organisation standardises on Terraform, the harder it becomes to justify console-managed recovery settings. The control question is whether recovery posture can be reviewed, reproduced, and enforced with the same discipline as provisioning.
For teams that delegate cloud administration, backup configuration should be treated as a change-controlled entitlement surface. Who can alter tags, policies, or account connections can materially change recovery outcomes.
For practitioners
- Put backup policy under infrastructure-as-code review Define recovery point objectives, retention tiers, and resource scope in Terraform so backup changes move through the same pull request workflow as infrastructure changes.
- Use tag-based protection for coverage at scale Apply consistent key/value tags to AWS resources so protection rules can automatically include existing and future assets without manual assignment.
- Reconcile declared backup state against live consoles Periodically compare the Terraform state and the console state to detect manual edits, then re-apply the declared configuration to bring drift back under control.
- Scope backup governance to multi-account workflows Treat account connections, policy changes, and protection rules as governed changes across the whole AWS estate, not as isolated per-team console tasks.
Key takeaways
- Manual backup configuration creates drift because protection rules sit outside the same governance model used for cloud infrastructure.
- Declarative backup policy makes recovery settings reviewable, reproducible, and easier to align across AWS accounts and environments.
- Tag-based protection is the scaling mechanism that lets backup policy follow resources automatically as the estate changes.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK addresses the attack and risk surface, while CIS Controls v8, NIST CSF 2.0 and CSA Cloud Controls Matrix set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| CIS Controls v8 | CIS-5 — Account Management | The article depends on governed access to accounts and policy changes across AWS estates. |
| Recommendation — Review account administration paths so backup policy changes stay controlled and attributable. | ||
| NIST CSF 2.0 | PR.AA-05 — Access Permissions, Entitlements and Authorizations | Backup policy changes depend on who can alter protection scope, tags, and account connections. |
| Recommendation — Restrict who can modify backup entitlements and validate protection scope against authorised access. | ||
| CSA Cloud Controls Matrix | IAM — Identity and Access Management | AWS backup governance here is tied to account linkage, role handling, and controlled access. |
| Recommendation — Apply IAM governance to the roles and permissions that can change backup configuration. | ||
| MITRE ATT&CK | TA0005; TA0040 — Stealth; Impact | Drift in backup policy creates a control gap that can hide changes and weaken recovery outcomes. |
| Recommendation — Map backup drift risks to attacker-impact pathways and watch for silent policy changes. | ||
Key terms
- Configuration Drift: Configuration drift is the gradual divergence between a system's intended secure state and the settings it actually runs with over time. In SaaS, drift often appears when admins change sharing, logging, or access controls under pressure and never return to validate the result.
- Infrastructure as Code coverage: The share of infrastructure that is created, changed, and governed through code rather than manual console actions. In practice, it measures how much of the environment can be reviewed, reproduced, and remediated through a controlled delivery path instead of ad hoc operator behaviour.
- Tag-Based Protection: Tag-based protection is a policy pattern where backup or security controls automatically apply to resources carrying specific metadata tags. It scales well in dynamic environments, but only works reliably when tagging standards are enforced and validated with the same discipline as other governance controls.
- Recovery Point Objective: Recovery Point Objective, or RPO, is the maximum acceptable amount of data loss a system can tolerate after disruption. In identity programmes, it defines how much configuration, policy, or state can be lost before recovery no longer preserves secure access.
Deepen your knowledge
NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, IAM, and workload identity in a way that helps security practitioners connect control design to operational change. It is useful for teams that need to align identity governance with the wider security programme.
Published by the NHIMG editorial team on July 9, 2026.
Updated on October 11, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org