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.
Payload=b'{"echo":"echo"}',
        )
        result = read_streams(result)
        snapshot.match("invoke-result", result)
        result_data = result["Payload"]
        assert 200 == result["StatusCode"]
        
        assert "LinkedHashMap" in to_str(result_data)
        assert result_data is not None
    @pytest.mark.skip_snapshot_verify(
        paths=["$..invoke-result.LogResult", "$..invoke-result.Payload"]
    )
    def test_java_runtime_with_large_payload(
        self, lambda_client, simple_java_lambda, caplog, snapshot
    ):
        """Tests a invocation against a java lambda with a 5MB payload"""
        snapshot.add_transformer(snapshot.transform.lambda_api())
        
        caplog.set_level(logging.INFO)
        payload = {"test": "test123456" * 100 * 1000 * 5}  
        payload = to_bytes(json.dumps(payload))
        result = lambda_client.invoke(FunctionName=simple_java_lambda, Payload=payload)
        result = read_streams(result)
        snapshot.match("invoke-result", result)
        result_data = result["Payload"]
        assert 200 == result["StatusCode"]
        assert "LinkedHashMap" in result_data
        assert result_data is not None
    @pytest.mark.skip_snapshot_verify
    def test_java_runtime_with_lib(self, lambda_client, create_lambda_function, snapshot):