Modify an AWS Secrets Manager secret - AWS Secrets Manager

Modify an AWS Secrets Manager secret

You can modify the metadata of a secret after it is created, depending on who created the secret. For secrets created by other services, you might need to use the other service to update or rotate it.

To determine who manages a secret, you can review the secret name. Secrets managed by other services are prefixed with the ID of that service. Or, in the AWS CLI, call describe-secret, and then review the field OwningService. For more information, see AWS Secrets Manager secrets managed by other AWS services.

For secrets you manage, you can modify the description, resource-based policy, the encryption key, and tags. You can also change the encrypted secret value; however, we recommend you use rotation to update secret values that contain credentials. Rotation updates both the secret in Secrets Manager and the credentials on the database or service. This keeps the secret automatically synchronized so when clients request a secret value, they always get a working set of credentials. For more information, see Rotate AWS Secrets Manager secrets.

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

To update a secret you manage (console)
  1. Open the Secrets Manager console at

  2. From the list of secrets, choose your secret.

  3. On the secret details page, do any of the following:

    Note that you can't change the name or ARN of a secret.


Example Update secret description

The following update-secret example updates the description of a secret.

aws secretsmanager update-secret \ --secret-id MyTestSecret \ --description "This is a new description for the secret."


We recommend you avoid calling PutSecretValue or UpdateSecret at a sustained rate of more than once every 10 minutes. When you call PutSecretValue or UpdateSecret to update the secret value, Secrets Manager creates a new version of the secret. Secrets Manager removes unlabeled versions when there are more than 100, but it does not remove versions created less than 24 hours ago. If you update the secret value more than once every 10 minutes, you create more versions than Secrets Manager removes, and you will reach the quota for secret versions.

To update a secret, use the following actions: UpdateSecret or ReplicateSecretToRegions. For more information, see AWS SDKs.