While I was deploying my application using serverless
npx serverless deploy
Error received
> Serverless Error ---------------------------------------- > > An error occurred: KeypairSecretRotationSchedule - Rotation is > blocked by pending secret version 2e0f7504-bc12-1234-3455-23f74aeabacf > not created by rotation. Remove the AWSPENDING staging label and > restart rotation. (Service: AWSSecretsManager; Status Code: 400; Error > Code: InvalidRequestException; Request ID: > adc85817-9744-4f94-9760-abf753205e92; Proxy: null).
so, I executed
D:\scripts>aws secretsmanager describe-secret --secret-id dev-rohit
Output received
{
    "ARN": "arn:aws:secretsmanager:ap-southeast-1:123456789012:secret:dev-rohit-jwt",
    "Name": "c2p-dev-rohit-jwt-keypair",
    "RotationEnabled": false,
    "RotationLambdaARN": "arn:aws:lambda:ap-southeast-1:123456789012:function:dev-rohit",
    "RotationRules": {
        "AutomaticallyAfterDays": 30
    },
    "LastRotatedDate": "2021-08-01T10:39:02.132000+05:30",
    "LastChangedDate": "2021-09-16T11:52:07.427000+05:30",
    "LastAccessedDate": "2021-09-16T05:30:00+05:30",
    "VersionIdsToStages": {
        "2e0f7504-bc12-1234-3455-23f74aeabacf": [
            "bed7",
            "AWSPENDING"
        ],
        "4ca2e0e8-56f1-4d3d-a234-3987a6e1044f": [
            "AWSPREVIOUS",
            "bed5"
        ],
        "afffc3ac-12b5-2348-3274-23ae068c3515": [
            "bed6",
            "AWSCURRENT"
        ]
    },
    "CreatedDate": "2021-03-02T10:35:55.015000+05:30"
}
How do I fix this issue? Can someone please help me? Will this rotation happen after sometime on its own or i have to do something for resolution?