View a markdown version of this page

Safety and auditing for mitigation plans - AWS Ops Agent (formerly DevOps Agent)

Safety and auditing for mitigation plans

This page describes the controls that limit what AWS Ops Agent can change when it runs a mitigation plan, how to stop operators from approving plan stages, and how to audit the changes.

Safety controls

AWS Ops Agent uses the following controls when it runs a mitigation plan:

  • You approve each stage – The agent makes no change without your approval in chat. Each approval covers only the changes in one stage.

  • Checks only read data – Pre-validation and verification checks don't change your resources.

  • Scoped credentials – For each change to an AWS resource, the agent uses credentials from your elevated role. AWS Ops Agent limits the credentials to the approved operation, and to its resource and AWS Region when the change names them. For more information, see Granting permissions to the elevated role.

  • Operations the agent will not perform – Some AWS operations are denied for the agent, even when your elevated role allows them. For each of these, the plan has a manual step with the AWS CLI command that you run yourself. For more information about operations the agent will not perform, see Operations the agent will not perform.

  • AWS changes only – The agent makes changes only through AWS operations. A change in a third-party system is always a manual step.

  • Approvals expire – An approval card that you don't answer within 30 minutes expires.

Preventing operators from running plans

To stop operators from moving a mitigation plan forward, add an explicit deny to their IAM role. The aidevops:ApprovalTarget condition key is PLAN for each plan approval card: running a stage, going on past failed pre-validation checks, marking a manual step as done, and marking a stage as done. It's TOOL_CALL for any other approval, including marking a rollback step as done. With the following policy, operators can still view plans and approve other actions in chat, but they can't approve any plan card.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Deny", "Action": "aidevops:UpdateApprovalAction", "Resource": "*", "Condition": { "StringEquals": { "aidevops:ApprovalTarget": "PLAN" } } } ] }

Auditing AWS Ops Agent mitigation plan changes

AWS CloudTrail records each mitigation plan action in two places:

  • Your Agent Space account – Approving a stage records an UpdateApprovalAction event. Stopping a plan records a StopPlan event. Each event shows the operator who made the request. For more information, see AWS CloudTrail integration.

  • The account that the agent changed – Each change appears as a call from your elevated role. The call carries a source identity that names the operator who approved the stage. For more information, see Monitoring and auditing.

On the Mitigation plan tab, each step also shows its input and its result.