Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying graphene on AWS Lambda + API Gateway #420

Closed
pedroabi opened this issue Feb 22, 2017 · 6 comments
Closed

Deploying graphene on AWS Lambda + API Gateway #420

pedroabi opened this issue Feb 22, 2017 · 6 comments

Comments

@pedroabi
Copy link

I am trying to use graphene with AWS Lambda + API Gateway. Does anyone has a code snippet showing how to handle the graphQL payload and response?

@yfilali
Copy link

yfilali commented Feb 26, 2017

I've used Zappa pretty successfully with flask + graphene + lambda. Zappa sets out api gateway routes for you and is a snap to get up and running from a flask application: https://github.com/Miserlou/Zappa

Shameless plug: there is also a pynamodb implementation for graphene in case you need to use dynamodb.

@pedrorjbr
Copy link

Hey. Why do you need flask to run it on Aws Lambda + API gateway?

I thought you just need to use graphene + API gateway + Aws lambda

@jkimbo
Copy link
Member

jkimbo commented Feb 18, 2018

Hi @pedroabi . We're currently going through old issues that appear to have gone stale (ie. not updated in about the last 6 months) to try and clean up the issue tracker. If this is still important to you please comment and we'll re-open this.

Thanks!

@jkimbo jkimbo closed this as completed Feb 18, 2018
@uprego
Copy link

uprego commented Jun 4, 2018

I got here looking for a simplest tutorial on deploying Graphene for Python to AWS Lambda to be used via AWS API Gateway without (if possible) adding Zappa.

The product is relatively small and the use case is kind of niche and (probably) unable to grow too large, so if there is no boilerplate or convenient demo, I'm going to be tempted into not using Graphene... and I don't like that.

@yfilali
Copy link

yfilali commented Jun 4, 2018

@uprego: packaging your application to run on AWS Lambdas has nothing to do with graphene. Graphene provides the graphql part of your backend, not the web application which would be provided by Flask/Django, etc.

Zappa is just one utility that helps you package your whole backend application for AWS API Gateway/Lambda, nothing prevents you from doing the same manually, but that is not graphene related. Using zappa for your project will take you about 5 minutes and 2-3 commands on the command line, so I highly recommend reading the getting started there: https://github.com/Miserlou/Zappa#basic-usage

@uprego
Copy link

uprego commented Jun 5, 2018

Things have pivoted aggressively so I'm not trying it before several months from now, but I am now more confident the basic example is probably going to be enough for me.

Zappa is just one utility that helps you package your whole backend application for AWS API Gateway/Lambda, nothing prevents you from doing the same manually, but that is not graphene related. Using zappa for your project will take you about 5 minutes and 2-3 commands on the command line, so I highly recommend reading the getting started there: https://github.com/Miserlou/Zappa#basic-usage

I appreciate your zeal, but I really think Zappa is sadly still very young for me to be considered as a good generic pipeline for AWS Lambda deployment (sources this, this, this and this, among others relating to proprietary software), by the way without needing Zappa I can already upload new code to AWS Lambda in one step, whenever no new dependency is required (sadly I've had to become knowledgeable in the arts of generating dependencies ready for the AWS Lambda runtimes Python 2 and 3).

Sorry for the noise and keep up the good stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants