Skip to content

Instantly share code, notes, and snippets.

@formigone
Last active September 11, 2018 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save formigone/22babc532544894e739ae033dffafb14 to your computer and use it in GitHub Desktop.
Save formigone/22babc532544894e739ae033dffafb14 to your computer and use it in GitHub Desktop.
Fetching data from AWS AppSync
query = '''
{
users {
id
created
firstName
lastName
email
}
}
'''
json = {'query': query}
headers = {'x-api-key': API_KEY}
req = requests.post(url=ENDPOINT, headers=headers, json=json)
data = req.json()
df = pd.DataFrame(data['data']['users'])
df = df.set_index('id')
df.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment