The finish_secret function has a bug in it if there is not a version found that is labeled as "AWSCURRENT".
If there is not a version found that is labeled as "AWSCURRENT", the code will set current_version as None. This will lead to update_secret_version_stage being called with RemoveFromVersionId as None. This results in a ParamValidationError being raised from the boto3 client.
The
finish_secret
function has a bug in it if there is not a version found that is labeled as "AWSCURRENT".If there is not a version found that is labeled as "AWSCURRENT", the code will set
current_version
asNone
. This will lead toupdate_secret_version_stage
being called withRemoveFromVersionId
asNone
. This results in aParamValidationError
being raised from the boto3 client.