AWS Chalice is a Python serverless microframework for AWS
1
Create App
2
Local Test
3
Deploy
4
API Gateway
5
Lambda
6
Live API
app.py
1
2
3
4
5
6
7
8
9
10
11
12
Create a Chalice App
$ pip install chalice
$ chalice new-project my-api
$ cd my-api
AWS Chalice uses Python decorators to define API routes, similar to Flask. The code on the left shows a basic Chalice application with three endpoints.
What is AWS Chalice?
AWS Chalice is a Python serverless microframework that makes it easy to create and deploy serverless applications on AWS using Amazon API Gateway and AWS Lambda.
Local Testing
$ chalice local
Serving on localhost:8000
Test API Locally
Response:
{"hello": "world"}
Deploy to AWS
Chalice makes deploying to AWS simple with a single command: chalice deploy