https://github.com/jahnelgroup/serverless-flask
A Serverless application using Python and Flask.
https://github.com/jahnelgroup/serverless-flask
Last synced: 2 days ago
JSON representation
A Serverless application using Python and Flask.
- Host: GitHub
- URL: https://github.com/jahnelgroup/serverless-flask
- Owner: JahnelGroup
- License: mit
- Created: 2019-06-26T03:45:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-09-08T08:03:37.000Z (about 3 years ago)
- Last Synced: 2025-10-08T09:43:18.020Z (2 days ago)
- Language: Python
- Size: 10.5 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Serverless Flask
This repository was made by following the article [Flask + Serverless — API in AWS Lambda the easy way](https://medium.com/@Twistacz/flask-serverless-api-in-aws-lambda-the-easy-way-a445a8805028) written by Michal Haták.
## Setup your virtualenv, activate it, install requirements
```bash
$ virtualenv venv -p python3
$ . venv/bin/activate
$ pip install -r requirements.txt
```## Setup AWS CLI
Install and configure your [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html).
Verify it's working with:
```bash
$ aws sts get-caller-identity
{
"Account": "",
"UserId": "",
"Arn": ""
}
```## Setup AWS IAM Groups / Policies
Create a new group called `Serverless` and add the following policies:
* AWSLambdaFullAccess
* IAMFullAccess
* AmazonAPIGatewayAdministrator## Setup Serverless
First upgrade to the latest version of npm with `npm install -g npm@latest`.
Then install the serverless packages.
```bash
$ npm install -g serverless
$ npm update -g serverless
```## Serverless Commands
Test locally with `sls wsgi serve`
Deploy with `sls deploy`
View logs with `sls logs -f app`
Remove it with `sls remove`