I have deployed an GraphQL API to AWS Lambda using the Zappa Framework. If I do a request from my local machine to the local server version like this everything works fine:
import requests
url = 'http://127.0.0.1:8000/graphql'
token = '...'
headers = {'Authorization': 'JWT '+token}
query = { 'query' : '{ ...}
r = requests.get(url=url, json=query, headers=headers)
print (r.text)
If I do the same request to my AWS URL https://xyz.execute-api.eu-central-1.amazonaws.com/production/graphql it yields the following error:
<H1>403 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
Bad request.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
It should be noted that the GraphiQL view works properly under the mentioned AWS URL where I can do my queries without any problems. Am I missing something to get it going from other devices machine to machine?
Cheers!