Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/revmischa/flask-serverless
Flask extension to integrate nicely with AWS Lambda and API Gateway
https://github.com/revmischa/flask-serverless
Last synced: 3 days ago
JSON representation
Flask extension to integrate nicely with AWS Lambda and API Gateway
- Host: GitHub
- URL: https://github.com/revmischa/flask-serverless
- Owner: revmischa
- Created: 2018-10-22T15:17:18.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-16T12:19:55.000Z (about 6 years ago)
- Last Synced: 2024-10-18T07:53:03.157Z (3 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Quickstart
To create a new serverless Flask application really quickly:1. Install pipenv and AWS SAM local and generate app boilerplate:
```sh
pip install aws-sam-cli pipenv
sam init --location https://github.com/aws-samples/cookiecutter-aws-sam-python
```
2. Add `flask_serverless` dependency
```sh
cd MyApp
make install
pipenv install flask_serverless
```
3. Replace `first_function/app.py` contents with:
```python
from flask_serverless import Serverless, Flask, APIGWProxyapp = Flask(__name__)
Serverless(app)
lambda_handler = APIGWProxy(app)@app.route('/')
def index():
return "Hello, friend!"
```
4. You're ready to go! Run `make run`. Read the README it spits out.### More Coming...
More documentation will be written soon.### Further Reading
[Serverless Flask applications on AWS lambda.](https://spiegelmock.com/2018/09/06/serverless-python-web-applications-with-aws-lambda-and-flask/)