While a lambda is still processing (archive unpacking etc), the lambda state should be set to "Pending" (currently "Active") and invocations to that lambda should fail (currently, it can end up in a inconsistent state in this case, like lambdas being executed without layers).

Lambda state should reflect the current internal state, and invocations should fail if not active.
region = LambdaRegion.get()
    data = json.loads(request.data)
    signing_profile_version_arns = data.get("AllowedPublishers").get("SigningProfileVersionArns")
    code_signing_id = "csc-%s" % long_uid().replace("-", "")[0:17]
    arn = aws_stack.code_signing_arn(code_signing_id)
    region.code_signing_configs[arn] = CodeSigningConfig(
        arn, code_signing_id, signing_profile_version_arns
    )
    code_signing_obj = region.code_signing_configs[arn]
    if data.get("Description"):
        code_signing_obj.description = data["Description"]
    if data.get("CodeSigningPolicies", {}).get("UntrustedArtifactOnDeployment"):
        code_signing_obj.untrusted_artifact_on_deployment = data["CodeSigningPolicies"][
            "UntrustedArtifactOnDeployment"
        ]
    code_signing_obj.last_modified = format_timestamp()
    result = {
        "CodeSigningConfig": {
            "AllowedPublishers": {
                "SigningProfileVersionArns": code_signing_obj.signing_profile_version_arns
            },
            "CodeSigningConfigArn": code_signing_obj.arn,
            "CodeSigningConfigId": code_signing_obj.id,
            "CodeSigningPolicies": {
                "UntrustedArtifactOnDeployment": code_signing_obj.untrusted_artifact_on_deployment
            },