View a markdown version of this page

Rolling back mitigation plan changes - AWS Ops Agent (formerly DevOps Agent)

Rolling back mitigation plan changes

If a change from a mitigation plan has an unwanted effect, you can undo it. The agent guides you through the rollback in chat, but it doesn't run any rollback step itself. You need to run each rollback step manually, and then mark it as done.

The agent walks you through undoing the changes that ran, starting with the latest change. You can roll back one stage, or every stage that ran. You can roll back a plan that is in progress, stopped, or completed.

To roll back a stage:

  1. On the Mitigation plan tab, choose Rollback in chat. The chat panel opens, with a request to roll back the stage in the message box. You can also ask the agent in chat to roll back a stage or the whole plan.

  2. To start the rollback, send the message. The agent lists the changes that it will undo, in order.

  3. For each change, the agent shows a rollback card. For an AWS change, the card shows the AWS Command Line Interface (AWS CLI) command to run and the account to run it in. For a change in a third-party system, such as a deployment rollback, the card shows that system's command, or tells you to undo the change in that system.

  4. Undo the change with your own credentials. For an AWS change, copy the command from the card and run it in the account shown.

  5. Choose Mark as done. The agent reads the resource to confirm that the undo took effect, and then shows the card for the next change.

When every change is undone, the agent lists each change and whether it was rolled back. On the Mitigation plan tab, each rollback step shows when you marked it as done.

If a rollback card has no command, the card tells you to undo the change yourself. To see the tool and parameters that undo the change, expand the rollback step in the Rollback phase on the Mitigation plan tab.

If the command fails, check the error. If the error is about permissions, check that your AWS Identity and Access Management (IAM) credentials allow the operation. Then run the command again.

Some changes can't be undone. The agent names each of these changes and its reason, and skips it. On the Mitigation plan tab, these changes show the message "Can't be rolled back:" and the reason.