Hi all, Is there an easy way to trigger a dagster ...
# ask-community
d
Hi all, Is there an easy way to trigger a dagster job from an AWS Lambda function that I already have or will I need to make a sensor instead?
a
d
@alex I cant seem to import the dagster_graphql library in my lambda, not sure why
@alex I have gotten past that issue ^ now my lambda keeps timing out on any of the graphql functions I may try to run (get status, start run, etc.). I am guessing the issue is how I have my
client
set up.
client = DagsterGraphQLClient("<endpoint name>", port_number=3000)
Do i need the
/graphql
at the end of my endpoint name?
a
have you gotten a local version working or do you not have network access to the dagit instance from your laptop?
d
I have network access to the dagit instance at the endpoint name
a
Do i need the /graphql at the end of my endpoint name?
I dont believe so based on the documentation and examples i see in the code base
are you sure you have the correct port ?
d
No longer timing out but definitely getting that it cannot connect
Copy code
[ERROR] DagsterGraphQLClientError: Error when connecting to url http://<endpoint name>/graphql. Did you specify hostname: <endpoint name> correctly?
a
and the url it returns is one you can visit in your browser successfully?
d
Yes
a
is it behind any kind of auth gateway?
d
I have given the lambda admin access to eliminate it being a permission issue
a
you may need to set the
transport
argument on
DagsterGraphQLClient
to pass any headers or however identity is established.
DagsterGraphQLClient
is just a thin wrapper atop https://github.com/graphql-python/gql
is there more context in the error output?
d
I was able to fix it based on the tip you gave me - It was an issue with access within a VPC. Thanks for the help!
👍 1