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.
"""Tests invoking a lambda function with environment variables set on creation"""
        snapshot.add_transformer(snapshot.transform.lambda_api())
        function_name = f"env-test-function-{short_uid()}"
        env_vars = {"Hello": "World"}
        creation_result = create_lambda_function(
            handler_file=TEST_LAMBDA_ENV,
            libs=TEST_LAMBDA_LIBS,
            func_name=function_name,
            envvars=env_vars,
            runtime=runtime,
        )
        snapshot.match("creation-result", creation_result)
        
        result = lambda_client.invoke(FunctionName=function_name, Payload=b"{}")
        result = read_streams(result)
        snapshot.match("invocation-result", result)
        result_data = result["Payload"]
        assert 200 == result["StatusCode"]
        assert json.loads(result_data) == env_vars
        
        result = lambda_client.get_function_configuration(FunctionName=function_name)
        snapshot.match("get-configuration-result", result)
        assert result["Environment"] == {"Variables": env_vars}
    @parametrize_python_runtimes
    @pytest.mark.skip_snapshot_verify
    def test_invocation_with_qualifier(
        self,
        lambda_client,
        s3_client,
        s3_bucket,