Run the following from the root dir:
docker-compose up
Expands on some great examples from: https://github.com/dstilesr/sls-docker-python/blob/master/Dockerfile and https://github.com/aztecweb/docker-serverless-offline.
- Updates the config.
- Adds Python dependencies.
- Some
sls
CLI flags have changed. - Adds a Database connection to the example.
http://localhost:3001/dev/psqljson
- returns JSON interpolationhttp://localhost:3001/dev/examples
- returns Examples list from within a Python Serverless function.http://localhost:3001/dev/otherapi
- calls another API deployment (common in layered microservice apps) and returns the retreived value.
http://localhost:8001/examples
http://localhost:8001/
- test/heartbeat endpoint for debugging Docker.
- The DB will execute scripts in init_json_sql.sql on initialization.
- These primarily showcase how to use postgres JSON functionalities ("NoSQL in SQL") and non-rectangular Record Sets.
- https://realpython.com/fastapi-python-web-apis/
- https://github.com/dstilesr/sls-docker-python/blob/master/Dockerfile
- https://github.com/aztecweb/docker-serverless-offline
- https://www.serverless.com/plugins/serverless-offline
- https://stackoverflow.com/questions/40741282/cannot-use-requests-module-on-aws-lambda