{"id":20042508,"url":"https://github.com/code4mk/aws-lambda-serverless-fastapi","last_synced_at":"2025-05-05T08:32:34.733Z","repository":{"id":242127783,"uuid":"805784796","full_name":"code4mk/aws-lambda-serverless-fastapi","owner":"code4mk","description":"aws lamda fastapi with serverless","archived":false,"fork":false,"pushed_at":"2024-12-01T15:56:35.000Z","size":158,"stargazers_count":16,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T19:52:41.778Z","etag":null,"topics":["fastapi","fastapi-lambda","fastapi-sqlalchemy","lambda","sdeops","serverless"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code4mk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-25T12:57:43.000Z","updated_at":"2025-03-29T14:29:26.000Z","dependencies_parsed_at":"2024-05-31T20:12:48.975Z","dependency_job_id":"2def934b-53e5-4a71-b08d-dbbb3559eca5","html_url":"https://github.com/code4mk/aws-lambda-serverless-fastapi","commit_stats":null,"previous_names":["code4mk/aws-lambda-serverless-fastapi"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code4mk%2Faws-lambda-serverless-fastapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code4mk%2Faws-lambda-serverless-fastapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code4mk%2Faws-lambda-serverless-fastapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code4mk%2Faws-lambda-serverless-fastapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code4mk","download_url":"https://codeload.github.com/code4mk/aws-lambda-serverless-fastapi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252466898,"owners_count":21752459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","fastapi-lambda","fastapi-sqlalchemy","lambda","sdeops","serverless"],"created_at":"2024-11-13T10:52:00.710Z","updated_at":"2025-05-05T08:32:34.216Z","avatar_url":"https://github.com/code4mk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-lambda-serverless-fastapi\nDeploy fastapi on aws lambda with serverless\n\n* production ready\n* good project structure\n* cd/cd with github action\n\n# local development (fastapi)\n\n## python virtual env\n```bash\n# create virtual environment\npython3 -m venv .aws_lambda_fastapi_venv\n\n# activate virtual environment\nsource .aws_lambda_fastapi_venv/bin/activate\n```\n\n## run fast api project\n\n```bash\n# install packages\npip3 install -r requirements.txt\n\n# run project with uvicorn\nuvicorn \"fastapi_project.main:app\" --reload --port=8000\n\n# or, run bash with shell\n./run_fastapi_project.sh\n```\n\n# deploy on production\n\n## github action \n\n* set secrets `SERVERLESS_ACCESS_KEY` , `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`\n\nNB: you can set environment variable `DATABASE_URL` and `LOAD_SQL_PROJECT` on lamda configuration (Environment variables). LOAD_SQL_PROJECT value will be `yes` \n\n## serverless\n\n* set your own data\n\n```bash\n# serverless.yml\norg: ****\napp: demo-app-api-fastapi\nservice: demo-app-api-fastapi\n```\n\n## with cli\n\n```bash\n serverless deploy --aws-profile your_aws_profile_name \n```\n\n\n# project route\n\n```bash\nhttp://localhost:8000/api/v1/users\nhttp://localhost:8000/health\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode4mk%2Faws-lambda-serverless-fastapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode4mk%2Faws-lambda-serverless-fastapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode4mk%2Faws-lambda-serverless-fastapi/lists"}