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.
result = read_streams(result)
        snapshot.match("invoke-result", result)
        result_data = result["Payload"]
        result_data = json.loads(result_data)
        assert "application/json" == result["ResponseMetadata"]["HTTPHeaders"]["content-type"]
        assert 200 == result["StatusCode"]
        assert isinstance(result_data, dict)
    @pytest.mark.skip_snapshot_verify(paths=["$..LogResult", "$..ExecutedVersion"])
    def test_invocation_type_event(self, lambda_client, python_function_name, snapshot):
        """Check invocation response for type event"""
        snapshot.add_transformer(snapshot.transform.lambda_api())
        result = lambda_client.invoke(
            FunctionName=python_function_name, Payload=b"{}", InvocationType="Event"
        )
        result = read_streams(result)
        snapshot.match("invoke-result", result)
        assert 202 == result["StatusCode"]
    @pytest.mark.skip_snapshot_verify(paths=["$..LogResult", "$..ExecutedVersion"])
    def test_invocation_type_dry_run(self, lambda_client, python_function_name, snapshot):
        """Check invocation response for type dryrun"""
        snapshot.add_transformer(snapshot.transform.lambda_api())
        result = lambda_client.invoke(
            FunctionName=python_function_name, Payload=b"{}", InvocationType="DryRun"
        )
        result = read_streams(result)
        snapshot.match("invoke-result", result)
        assert 204 == result["StatusCode"]
    @parametrize_python_runtimes
    @pytest.mark.skip_snapshot_verify
    def test_lambda_environment(self, lambda_client, create_lambda_function, runtime, snapshot):