I'm trying to rotate the password using AWS Secret Manager. But i'm facing limit exceeded exception while doing UpdateSecret or PutSecret. Currently i've only one version for the secret. In AWS docs i found that there is a limit of ~100 version per secret.

Here is the output of list-secret-version-ids

{
     "Versions": [
        {
           "VersionId": "******-a71e-****-8948-*******",
           "VersionStages": [
              "AWSCURRENT",
              "AWSPREVIOUS"
           ],
           "LastAccessedDate": 1539043200.0,
           "CreatedDate": 1538724341.37
        }
    ],
    "ARN": "arn:aws:secretsmanager:us-west-2:*****:secret:*****",
    "Name": "29_SECRET"
}

I haven't find any solution so far. Please suggest how i can resolve this issue. Thanks in advance.

1

There are 1 best solutions below

0
On

Most likely you are trying to rotate the secret too quickly. Secrets Manager will automatically clean up deprecated secrets asynchronously, but this takes time. If you create them faster than they can be deleted, you will run into limits.