You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/event_handler/api_gateway.md
-149Lines changed: 0 additions & 149 deletions
Original file line number
Diff line number
Diff line change
@@ -960,155 +960,6 @@ When necessary, you can set a prefix when including a router object. This means
960
960
# many other related /users routing
961
961
```
962
962
963
-
#### Sample larger layout
964
-
965
-
!!! info "We use ALB to demonstrate that the UX remains the same"
966
-
967
-
Below is an example project layout where we have Users routes similar to the previous example, and health check route.
968
-
969
-
Note that this layout optimizes for code sharing and for those familiar with Python modules. This means multiple functions will share the same `CodeUri` and package, though they are only built once.
970
-
971
-
!!! tip "External dependencies can be [built as a Lambda Layer](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/building-layers.html){target="_blank"} and set as `dev` dependencies for the project, though outside of scope for this documentation."
972
-
973
-
=== "Project layout"
974
-
975
-
```python hl_lines="10-13"
976
-
.
977
-
├── Pipfile # project dev dependencies
978
-
├── Pipfile.lock
979
-
├── src
980
-
│ ├── __init__.py
981
-
│ ├── requirements.txt # dummy for `sam build`, as external deps are Lambda Layers
982
-
│ └── app
983
-
│ ├── __init__.py # this file makes "app" a "Python package"
984
-
│ ├── main.py # Main lambda handler (app.py, index.py, handler.py)
985
-
│ └── routers # routers module
986
-
│ ├── __init__.py # this file makes "routers" a "Python package"
987
-
│ ├── health.py # "health" submodule, e.g. from .routers import health
988
-
│ └── users.py # "users" submodule, e.g. from .routers import users
989
-
├── template.yaml # SAM template.yml
990
-
└── tests
991
-
├── __init__.py
992
-
├── unit
993
-
│ ├── __init__.py
994
-
│ └── test_health.py # unit tests for the health router
995
-
└── functional
996
-
├── __init__.py
997
-
├── conftest.py # pytest fixtures for the functional tests
998
-
└── test_app_main.py # functional tests for the main lambda handler
0 commit comments