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.
ids=["dotnetcore3.1", "dotnet6"],
    )
    @pytest.mark.skip_snapshot_verify
    def test_dotnet_lambda(
        self,
        zip_file,
        handler,
        runtime,
        expected_lines,
        lambda_client,
        create_lambda_function,
        snapshot,
    ):
        """Test simple dotnet lambda invocation"""
        snapshot.add_transformer(snapshot.transform.lambda_api())
        function_name = f"test-function-{short_uid()}"
        create_result = create_lambda_function(
            func_name=function_name,
            zip_file=load_file(zip_file, mode="rb"),
            handler=handler,
            runtime=runtime,
        )
        snapshot.match("create-result", create_result)
        result = lambda_client.invoke(FunctionName=function_name, Payload=b"{}")
        result = read_streams(result)
        snapshot.match("invoke-result", result)
        result_data = result["Payload"]
        assert 200 == result["StatusCode"]
        assert "{}" == result_data.strip()