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
- Edge-Optimized (default): For global clients - Requests are routed through the CloudFront Edge locations (improves latency) - The API Gateway still lives in only one region
1367
+
- Regional: - For clients within the same region - Could manually combine with CloudFront (more control over the caching strategies and the distribution)
1368
+
- Private: - Can only be accessed from your VPC using an interface VPC endpoint (ENI) - Use a resource policy to define access
1369
+
1370
+
## API Gateway -- Deployment Stages
1371
+
- Making changes in the API Gateway does not mean they're effective
1372
+
- You need to make a "deployment" for them to be in effect
1373
+
- It's a common source of confusion
1374
+
- Changes are deployed to "Stages" (as many as you want)
1375
+
- Use the naming you like for stages (dev, test, prod)
1376
+
- Each stage has its own configuration parameters
1377
+
- Stages can be rolled back as a history of deployments is kept
1378
+
1379
+
## API Gateway -- Stage Variables
1380
+
- Stage variables are like environment variables for API Gateway
1381
+
- Use them to change often changing configuration values
1382
+
- They can be used in:
1383
+
- Lambda function ARN
1384
+
- HTTP Endpoint
1385
+
- Parameter mapping templates
1386
+
- Use cases:
1387
+
- Configure HTTP endpoints your stages talk to (dev, test, prod...)
1388
+
- Pass configuration parameters to AWS Lambda through mapping templates
1389
+
- Stage variables are passed to the "context" object in AWS Lambda
1390
+
1391
+
## API Gateway - Integration Types
1392
+
- Integration Type MOCK
1393
+
- API Gateway returns a response without sending the request to the backend
1394
+
- Integration Type HTTP / AWS (Lambda & AWS Services)
1395
+
- you must configure both the integration request and integration response
1396
+
- Setup data mapping using mapping templates for the request & response
1397
+
- Integration Type AWS_PROXY (Lambda Proxy):
1398
+
- incoming request from the client is the input to Lambda
1399
+
- The function is responsible for the logic of request / response
1400
+
- No mapping template, headers, query string parameters... are passed as arguments
1401
+
- Integration Type HTTP_PROXY
1402
+
- No mapping template
1403
+
- The HTTP request is passed to the backend
1404
+
- The HTTP response from the backend is forwarded by API Gateway
0 commit comments