https://prefect.io logo
Title
r

Robin

03/29/2023, 9:31 AM
However, I get the following error (ACCOUNT_ID and WORSKPACE_ID as obtained from a prefect agent):
[ERROR] ConnectionError: HTTPSConnectionPool(host='api.prefect.cloud', port=443): Max retries exceeded with url: /api/accounts/{ACCOUNT_ID}/workspaces/{WORKSPACE_ID} (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f04a5873310>: Failed to establish a new connection: [Errno 110] Connection timed out'))
3. Any tips what could cause the error?
2
r

redsquare

03/29/2023, 9:39 AM
when you say provides internet access - have you got a NAT Gateway
1
the approach is fine - prefect mentioned they were hoping to bring triggers from s3 out in the future but atm is good
r

Robin

03/29/2023, 12:29 PM
When I run the query via request locally, I get the following response:
status_code:
405
text:
'{"detail":"Method Not Allowed"}'
This is the code I am using
r

Robin

03/29/2023, 12:36 PM
Nice catch!
👍 1
I now get the
422
error, so getting closer 👌
r

redsquare

03/29/2023, 12:41 PM
yeah your payload is not right
r

Robin

03/29/2023, 12:58 PM
Yes, so far I used
query = """
    mutation($flowId: UUID!) {
      create_flow_run(input: { flow_id: $flowId }) {
        id
        name
        flow {
          id
          name
        }
      }
    }
    """
and
mutation($flowId: UUID!) {
      create_flow_run(input: { flow_id: $flowId })
}
I am new to GraphQL, so I have difficulties translating from the docs into a proper query 🌱
r

redsquare

03/29/2023, 12:59 PM
Ah prefect 2 is rest not graph
(thankfully)
💯 1
r

Robin

03/29/2023, 1:01 PM
omg
r

redsquare

03/29/2023, 1:01 PM
Also - you could use a python lambda and use the python api to create a flow run
r

Robin

03/29/2023, 1:02 PM
yeah, that sounds like a much better approach
Do you have some pointers on which docs I should read?
r

redsquare

03/29/2023, 1:06 PM
sure
note the 'Orion' nomenclature is now Server
r

Robin

03/29/2023, 1:09 PM
OK!
Wow, haven't used prefect for a year now and things have changed so much (for the better it seems)! Thanks for your help so far! Will read up and get back here if needed 🙂
👍 2
r

redsquare

03/29/2023, 1:16 PM
No probs