Using Global Settings to Configure the Implicit API
Explore how to configure implicit APIs in AWS SAM to choose between edge-optimized and regional API Gateway endpoints. Understand their impact on latency, costs, and global user access. Learn to modify SAM templates to optimize your serverless application's API deployment.
We'll cover the following...
With the Lambda Proxy integration, API Gateway just packages all the request properties and forwards them to Lambda. However, if you look at one of the request logs carefully (see figure here), you’ll notice some headers that do not look like they are coming from a browser. For example, CloudFront-Viewer-Country shows the ISO country code where the request originated. This is because the request did not go directly from a browser to API Gateway. Instead, it first went to the AWS global content distribution system called CloudFront, which put in some additional headers.
API Gateway configurations
SAM can set up two types of API Gateway configuration:
- Edge-optimised
- Regional
Edge-optimised APIs
Edge optimised APIs are served from a ...