A minimal serverless API implementation in Python
Features:
- Lambda + DynamoDB + HttpApi (a cheaper alternative to RestApi)
- dynamodb mapping via pynamodb
See also similar project in Java
Create deployable artifact (source code + dependecies from requirements.txt
):
❯ bin/package.sh
Deploy:
❯ sam deploy --guided
Invoke the remote endpoint:
❯ url=https://????.execute-api.eu-west-1.amazonaws.com/
# Add some data
❯ http $url/events < sample-payloads/oxford.json
❯ http POST $url/events < sample-payloads/brooklin.json
# Query data
❯ http GET "$url/locations?loc=Oxford, UK"