A while back I let an agent clean up my AWS account. Old CloudFormation stacks, years of leftovers, the kind of chore I kept putting off. I wrote about it in The AWS Cleanup We Keep Putting Off.
The part I kept coming back to wasn't the cleanup. It was one small beat. Before the agent deleted anything, it stopped, listed the stacks back to me, and asked me to confirm.
That felt safe. But it was only safe because the agent chose to pause. The safety lived in the agent's judgment, not in the deployment itself. And agents don't deploy to AWS by clicking around a console. They deploy with CloudFormation and AWS CDK, the same way a lot of us do.
So the question that stuck with me: what actually stops a deployment from deleting data you still use? Not the agent being careful. The platform.
AWS just answered that.
88 new controls, checked before anything changes
CloudFormation and CDK now ship 88 new AWS-managed proactive controls for data protection and business continuity. They check a stack operation before any resource changes, so a risky deploy gets caught at the preview stage instead of after the damage is done.
AWS already had proactive controls for security and compliance. These new ones target a different kind of mistake: deleting data, or disrupting an application that's still running. What I like is where they come from. They're built from the checks AWS runs on its own infrastructure, at its own scale. This is the same muscle, pointed at our templates.
A proactive control is a check that runs on the change set, the preview CloudFormation builds before it touches anything. The data-protection controls that look for a resource still in use are enabled by default, in Warn mode, in every account. You didn't have to turn anything on to get them.
Warn versus Fail
Each control runs in one of two modes.
In Warn mode, the control reports a finding and the deployment continues. You get told, you decide.
In Fail mode, the control stops the deployment before any resource changes. Nothing gets deleted or replaced.
The default for the use-detection controls is Warn. That's the one knob worth knowing about before you lean on this: a Warn finding will NOT stop a deployment.
If you want a deploy blocked when a resource is still in use, you set that control to Fail. You can do that per control.
The clever bit is how the use-detection controls decide. They read a resource's recent activity to tell whether your applications still depend on it. So the check isn't "is this a database," it's "is this database still getting traffic."
A few it actually catches
There are 88 in all. The docs spell out only two by name, and you pull the full list in your own account with aws cloudformation list-types. The two they name:
A DynamoDB table that's still taking traffic. The control is AWS::Controls::DynamoDBTableInUseRemoved. Delete a table that read or wrote in the last 24 hours and the finding is specific: "Removing DynamoDB table OrdersTable deletes the table and its data. The table consumed read or write capacity in the last 24 hours."
An IAM role something is still assuming. The control is AWS::Controls::IAMRoleInUseRemoved. This one reads the role's last-used data over a longer window, the last 7 days, because a role can sit quiet for days and still be load-bearing.
Findings show up in the CloudFormation console, in the DescribeEvents API, and in cdk deploy output. That last one matters for the agent story: the finding lands in the same output stream the agent is already reading, so it has a real chance to notice and course-correct.
Where the Agent Toolkit fits
The launch is explicit that these controls are for agents as much as for people. If you use the Agent Toolkit for AWS, and I think you should, it's worth seeing these as two layers that do different jobs. The toolkit gives the agent AWS judgment going in, before it writes the template. Proactive controls are the backstop at the gate, checking what actually gets deployed. Good guidance up front, a guardrail at the end. You want both, because neither one covers the other's job.
Check out setup instructions in this post.
One thing to clear up, because I wondered the same: you don't ask the toolkit to create these controls. The data-protection controls are AWS-managed and already on. What the toolkit adds is a skill that helps the agent work with them.
If an agent is doing the deploying
AWS wrote a page just for this, and it's the part I'd read twice. Agents that deploy through CloudFormation or CDK get the controls with no setup. But a few choices decide whether the controls actually hold.
Don't let the agent turn the checks off. Deny DisableValidation in the role the agent uses. An agent that can skip validation is right back to running on its own judgment.
Give the role permission to actually run the check. This one surprised me. The in-use controls read a resource's recent activity using the caller's own credentials, CloudWatch metrics with cloudwatch:GetMetricData and IAM role data with iam:GetRole. If the role can't read that activity, a Fail control stops and names the missing permission, but a Warn control just continues. Since the default controls run in Warn mode, an agent on a scoped-down role can look protected while the check passes every deploy. Grant those two read actions, or set the controls you depend on to Fail so a check that can't run blocks the deploy instead of waving it through. You aren't charged for the CloudWatch calls.
Make the agent look before it leaps. Have it preview with a change set, or cdk deploy --method=prepare-change-set, and read the findings with describe-events before it executes anything. That's the loop where the agent catches its own mistake.
Give it the CloudFormation skill. Install the toolkit's aws-cloudformation skill so the agent can validate templates and change sets, read the results, and troubleshoot a failed stack operation:
npx skills add aws/agent-toolkit-for-aws/skills --skill aws-cloudformation --yes --global Setup steps for Kiro, Claude Code, and other agents are in the agent setup guide.
Rolling it out
You manage the controls on the Hooks page in the CloudFormation console, or through the AWS CLI. You can enable or disable any control and set each to Warn or Fail.
To apply the same settings across accounts, Regions, or a whole organization, you use AWS CloudFormation StackSets. The controls apply to stack operations that run through CloudFormation, which includes CDK and AWS SAM, so you cover those paths at the same time.
They're available at no additional charge in every Region where CloudFormation runs, except the AWS China Regions.
The takeaway
If you're just getting started with agents on AWS, the reassuring part is that the platform is picking up some of the safety work. You don't have to trust that every agent will pause before it deletes something. CloudFormation now looks at the deployment itself, and the data-protection checks are on by default.
If you're on the builder side, spend ten minutes in the Hooks page. Look at which controls are on, decide which ones you want in Fail instead of Warn, and push your choices across the org with StackSets. The default Warn mode tells you; Fail mode is what actually stops a bad deploy.
My agent asking before it deleted was a nice habit. This is the version that doesn't depend on the habit.
Links
- 88 new proactive controls, the launch announcement. The official what's-new, with the full scope.
- AWS-managed proactive controls, the docs. How the two control groups differ and how to set modes.
- The AWS Cleanup We Keep Putting Off. The post this one follows from.


