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: README.md
+23-4Lines changed: 23 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,21 @@
1
1
# AWS FastAPI Lambda
2
2
Create an API using AWS API Gateway, Lambda and FastAPI + Mangum (based on [this walkthrough](https://towardsdatascience.com/fastapi-aws-robust-api-part-1-f67ae47390f9)):
3
3
4
-
* Lambda is deployed in a VPC, so has access to private resources.
5
-
* Currently no Internet Gateway setup, so Lambda has no internet access.
6
-
* VPC endpoints have been created for CloudWatch logging/monitoring.
4
+
```js
5
+
┌─── AWS region ────────────────────────────┐
6
+
│ ┌─── VPC ──────────────┐ │
7
+
│ │ │ │
8
+
Request ───► API Gateway ───► Lambda (FastAPI) │ │
9
+
│ │ │ │
10
+
│ │ └──────────│───────────┘ │
11
+
│ ┌───────│───────────────────│───────────┐ │
12
+
│ │ ▼ CloudWatch ▼ │ │
13
+
│ └───────────────────────────────────────┘ │
14
+
└───────────────────────────────────────────┘
15
+
```
16
+
17
+
* Lambda is deployed in a VPC, so the function has access to private resources.
18
+
* No Internet Gateway, so Lambda uses VPC endpoints for access to CloudWatch.
7
19
8
20
# Dev
9
21
```sh
@@ -26,7 +38,8 @@ terragrunt run-all plan # to see all the goodness that will get created
26
38
terragrunt run-all apply # create all the goodness
27
39
```
28
40
29
-
# Note
41
+
# Notes
42
+
## Root path
30
43
The API gateway proxy integration with the Lambda function does not include a `/` root path. If you need a root path, you'll need to add this method integration:
0 commit comments