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.
runtime,
        check_lambda_logs,
        lambda_su_role,
        wait_until_lambda_ready,
        snapshot,
    ):
        """Tests invocation of python lambda with a given qualifier"""
        snapshot.add_transformer(snapshot.transform.lambda_api())
        function_name = f"test_lambda_{short_uid()}"
        bucket_key = "test_lambda.zip"
        
        zip_file = create_lambda_archive(
            load_file(TEST_LAMBDA_PYTHON), get_content=True, libs=TEST_LAMBDA_LIBS, runtime=runtime
        )
        s3_client.upload_fileobj(BytesIO(zip_file), s3_bucket, bucket_key)
        
        response = lambda_client.create_function(
            FunctionName=function_name,
            Runtime=runtime,
            Role=lambda_su_role,
            Publish=True,
            Handler="handler.handler",
            Code={"S3Bucket": s3_bucket, "S3Key": bucket_key},
            Timeout=10,
        )
        snapshot.match("creation-response", response)
        assert "Version" in response
        qualifier = response["Version"]
        wait_until_lambda_ready(function_name=function_name, qualifier=qualifier)