AWS Chalice Starter Template with Build-in Swagger UI Support
AWS Chalice is a micoservice framework for writing serverless appications in python. User can quickly create and deploy applications to AWS environment.
This project provides a ready-to-use template for your project. The biggest value-add is the built-in Swagger UI.
- Visual Studio Code
- Python >= 3.8.1
- AWS Credential
Clone Git Repository to your local file system
git clone https://github.com/samuelkhtu/aws-chalice-template.git
Navigate to the aws-chalice-template folder
cd aws-chalice-template
Setup Python Virtual Environment
python -m venv .venv
Activate Python Virtual Environment
# Mac
source .venv/bin/Activate
# Window
source .venv/Scripts/Activate
Install Required Python Library
pip install -r requirements.txt
Deploy To AWS
❯ chalice deploy
Updating lambda function: aws-chalice-template-dev
Updating rest API
Resources deployed:
- Lambda ARN: arn:aws:lambda:us-east-1::function:aws-chalice-template-dev
- Rest API URL: https://...execute-api.us-east-1.amazonaws.com/dv/
Copy & paste the URL from your terminal to your browser. You should see the familiar Swagger UI.
Log level is controlled by ENV_LOG_LEVEL
environment variables. .chalice\config.json
-
CRITICAL
-
ERROR
-
WARNING
-
INFO
-
DEBUG
-
NOTSET
-
Reference: logging level
You can customize the IAM role policy with your project.