FastAPI python backend server with multi-stage CI/CD deployment
FastAPI python backend server with multi-stage CI/CD deployment
This project act as a template for a FastAPI server deployed on AWS Lambda for production use.
.env filenpm install -g serverless)git clone https://github.com/larium/fastapi-serverless-aws-backend.gitcd fastapi-serverless-aws-backend
npm install
poetry install.env filetouch .envTBAchmod 777 ./scripts/*./scripts/check./scripts/test./scripts/startTest it
curl --request GET "https://localhost:8000"
.env file in ACM_ARNserverless.yml -> set customDomain.enabled: truebaseDomain with your base domain./scripts/create-domain./scripts/deployTest it
curl --request GET "https://.execute-api..amazonaws.com/dev/"
./scripts/remove./scripts/delete-domain| What | How (script) | Where (endpoint) |
|---|---|---|
| Local | ./scripts/start |
http://localhost:8000 |
| Remote | ./scripts/deploy |
https://***.execute-api..amazonaws.com/dev/ |
| Develop Domain | ./scripts/create-domain``./scripts/deploy |
https://api-develop.your.domain |
| Staging Domain | ./scripts/create-domain staging``./scripts/deploy staging |
https://api-staging.your.domain |
| Production Domain | ./scripts/create-domain prod``./scripts/deploy prod |
https://api.your.domain |
We welcome contributions to this project! If you have an idea for a new feature or improvement, please open an issue or pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
poetry run which python and copy the python pathcommand+shift+p to open the VScode command shortcuts and enter Python: Select Interpreter+ Enter interpreter path... and paste the python pathNo open issues yet, or sync has not completed.