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.
PYTHON_TEST_RUNTIMES,
)
class TestPythonRuntimes:
    @pytest.fixture(
        params=PYTHON_TEST_RUNTIMES,
    )
    def python_function_name(self, request, lambda_client, create_lambda_function):
        function_name = f"python-test-function-{short_uid()}"
        create_lambda_function(
            func_name=function_name,
            handler_file=TEST_LAMBDA_PYTHON,
            libs=TEST_LAMBDA_LIBS,
            runtime=request.param,
        )
        return function_name
    @pytest.mark.skip_snapshot_verify(
        paths=["$..Payload.context.memory_limit_in_mb", "$..logs.logs"]
    )
    def test_invocation_type_not_set(self, lambda_client, python_function_name, snapshot):
        """Test invocation of a lambda with no invocation type set, but LogType="Tail""" ""
        snapshot.add_transformer(snapshot.transform.lambda_api())
        snapshot.add_transformer(
            snapshot.transform.key_value("LogResult", reference_replacement=False)
        )
        result = lambda_client.invoke(
            FunctionName=python_function_name, Payload=b"{}", LogType="Tail"
        )
        result = read_streams(result)
        snapshot.match("invoke", result)
        result_data = json.loads(result["Payload"])