View a markdown version of this page

Use controls with AI agents - CloudFormation

Use controls with AI agents

Data protection and business continuity controls help you give AI agents more infrastructure work, such as cleanup and optimization. AI agents that deploy through CloudFormation or AWS Cloud Development Kit (AWS CDK) get the controls with no setup. The controls check the stack operations that the agent runs through CloudFormation, before any resource changes.

For agents, use the following recommendations:

  • Deny DisableValidation in the roles that agents use. For more information, see Override controls for an operation.

  • Set FAIL mode for the controls that cover the resources your applications depend on.

  • Have the agent preview changes with change sets, or with cdk deploy --method=prepare-change-set. Have the agent read the findings with describe-events before it executes the change set. For more information, see View findings from controls.

Install the CloudFormation skill for your agent

To help your agent work with CloudFormation, install the aws-cloudformation skill from the Agent Toolkit for AWS. The skill helps the agent validate templates and change sets, read validation results, and troubleshoot failed stack operations. For example, for agents that support the open source agent skills format, run the following command:

npx skills add aws/agent-toolkit-for-aws/skills --skill aws-cloudformation --yes --global

For installation steps for Claude Code, Kiro, and other agents, see Agent setup guide in the CloudFormation User Guide.