Data Protection

A Secrets Manager rotation function successfully promotes a pending version, but its response is lost. When Secrets Manager retries finishSecret with the same version token, what should the function do?

Show the answer

Correct answerA. Return successfully if that version is already AWSCURRENT.

AWhy this is right: Checking whether the supplied version is already AWSCURRENT lets the function safely recognize completed work.

BWhy not this: Repeating the database change is unnecessary and can create a mismatch with the stored secret.

CWhy not this: A retried successful operation does not justify rolling back the current secret version.

DWhy not this: Generating another password changes an already completed rotation rather than safely handling its retry.

Rotation steps must be idempotent: if the supplied version is already AWSCURRENT, finishSecret should return successfully. Repeating the password change can cause the database credentials and stored secret to diverge.