Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Python module to make Flask compatible with AWS Lambda for creating RESTful applications

Project Description

Python module to make Flask compatible with AWS Lambda for creating RESTful applications.


pip install flask-lambda


This module works pretty much just like Flask. This allows you to run and develop this applicaiton locally just like you would in Flask. When ready deploy to Lambda, and configure the handler as:

Here is an example of what would look like:

from flask_lambda import FlaskLambda

app = FlaskLambda(__name__)

@app.route('/foo', methods=['GET', 'POST'])
def foo():
    data = {
        'form': request.form.copy(),
        'args': request.args.copy(),
        'json': request.json
    return (
        json.dumps(data, indent=4, sort_keys=True),
        {'Content-Type': 'application/json'}

if __name__ == '__main__':


Nothing special here, this module works without issue with Flask-RESTful as well.

API Gateway

Configure your API Gateway with a {proxy+} resource with an ANY method. Your “Method Response” should likely include an application/json “Response Body for 200” that uses the Empty model.


Consider using python-mu.

Release History

This version
History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(5.2 kB) Copy SHA256 Hash SHA256
Wheel 2.7 Dec 22, 2016
(3.8 kB) Copy SHA256 Hash SHA256
Source None Dec 22, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers