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.
assert result_data in (
            """Echoing request: '{"text": "bar with \'quotes\\""}'""",
            """Echoing request: '{"text":"bar with \'quotes\\""}'""",
        )
        
        expected = [".*Custom Runtime Lambda handler executing."]
        def check_logs():
            check_lambda_logs(function_name, expected_lines=expected)
        retry(check_logs, retries=20)
class TestDotNetCoreRuntimes:
    @pytest.mark.skipif(
        not use_docker(), reason="Dotnet functions only supported with docker executor"
    )
    @pytest.mark.parametrize(
        "zip_file,handler,runtime,expected_lines",
        [
            (
                TEST_LAMBDA_DOTNETCORE31,
                "dotnetcore31::dotnetcore31.Function::FunctionHandler",
                LAMBDA_RUNTIME_DOTNETCORE31,
                ["Running .NET Core 3.1 Lambda"],
            ),
            (
                TEST_LAMBDA_DOTNET6,
                "dotnet6::dotnet6.Function::FunctionHandler",
                LAMBDA_RUNTIME_DOTNET6,
                ["Running .NET 6 Lambda"],
            ),
        ],