Table Of Contents


User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . secretsmanager ]



Disables automatic scheduled rotation and cancels the rotation of a secret if one is currently in progress.

To re-enable scheduled rotation, call rotate-secret with AutomaticallyRotateAfterDays set to a value greater than 0. This will immediately rotate your secret and then enable the automatic schedule.


If you cancel a rotation that is in progress, it can leave the VersionStage labels in an unexpected state. Depending on what step of the rotation was in progress, you might need to remove the staging label AWSPENDING from the partially created version, specified by the SecretVersionId response value. You should also evaluate the partially rotated new version to see if it should be deleted, which you can do by removing all staging labels from the new version's VersionStage field.

To successfully start a rotation, the staging label AWSPENDING must be in one of the following states:

  • Not be attached to any version at all
  • Attached to the same version as the staging label AWSCURRENT

If the staging label AWSPENDING is attached to a different version than the version with AWSCURRENT then the attempt to rotate fails.

Minimum permissions

To run this command, you must have the following permissions:

  • secretsmanager:CancelRotateSecret
Related operations
  • To configure rotation for a secret or to manually trigger a rotation, use rotate-secret .
  • To get the rotation configuration details for a secret, use describe-secret .
  • To list all of the currently available secrets, use list-secrets .
  • To list all of the versions currently associated with a secret, use list-secret-version-ids .

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.


--secret-id <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]


--secret-id (string)

Specifies the secret for which you want to cancel a rotation request. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.


ARN -> (string)

The ARN of the secret for which rotation was canceled.

Name -> (string)

The friendly name of the secret for which rotation was canceled.

VersionId -> (string)

The unique identifier of the version of the secret that was created during the rotation. This version might not be complete, and should be evaluated for possible deletion. At the very least, you should remove the VersionStage value AWSPENDING to enable this version to be deleted. Failing to clean up a cancelled rotation can block you from successfully starting future rotations.