Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Restore an AWS Secrets Manager secret

Focus mode
Restore an AWS Secrets Manager secret - AWS Secrets Manager

Secrets Manager considers a secret scheduled for deletion deprecated and you can no longer directly access it. After the recovery window has passed, Secrets Manager deletes the secret permanently. Once Secrets Manager deletes the secret, you can't recover it. Before the end of the recovery window, you can recover the secret and make it accessible again. This removes the DeletionDate field, which cancels the scheduled permanent deletion.

To restore a secret and the metadata in the console, you must have secretsmanager:ListSecrets and secretsmanager:RestoreSecret permissions.

Secrets Manager generates a CloudTrail log entry when you restore a secret. For more information, see Log AWS Secrets Manager events with AWS CloudTrail.

To restore a secret (console)
  1. Open the Secrets Manager console at https://console.aws.amazon.com/secretsmanager/.

  2. In the list of secrets, choose the secret you want to restore.

    If deleted secrets don't appear in your list of secrets, choose Preferences ( Gear icon representing settings or configuration options. ). In the Preferences dialog box, select Show secrets scheduled for deletion, and then choose Save.

  3. On the Secret details page, choose Cancel deletion.

  4. In the Cancel secret deletion dialog box, choose Cancel deletion.

AWS CLI

Example Restore a previously deleted secret

The following restore-secret example restores a secret that was previously scheduled for deletion.

aws secretsmanager restore-secret \ --secret-id MyTestSecret

AWS SDK

To restore a secret marked for deletion, use the RestoreSecret command. For more information, see AWS SDKs.

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.