You are on page 1of 2

EDGE-OPTIMIZED ENDPOINTS VS REGIONAL-ENDPOINTS

API endpoint

A hostname for an API in API Gateway that is deployed to a specific region. The hostname is of the form
{api-id}.execute-api.{region}.amazonaws.com

The following types of API endpoints are supported:

 Edge-optimized API endpoint


 Private API endpoint
 Regional API endpoint

EDGE LOCATION

An edge location is where end users access services located at AWS. They are located in most of the
major cities around the world and are specifically used by CloudFront (CDN) to distribute content to end
user to reduce latency. It is like frontend for the service we access which are located in AWS cloud.

If you were to take a literal definition from AWS Glossary pages, it would something like this: A site that
CloudFront uses to cache copies of your content for faster delivery to users at any location.

Edge-optimized API endpoint

1. The default host name of an API Gateway API that is deployed to the specified region while
using a CloudFront distribution to facilitate client access typically from across AWS regions.
2. API requests are routed to the nearest CloudFront Point of Presence (POP), which typically
improves connection time for geographically diverse clients.

Important details to remember regarding the first version of the Edge Optimized API Gateway:

 It uses CloudFront distributions, but you can’t edit the distribution. Adding Amazon Web
Application Firewall (WAF), for example, is not possible.
 It can access other sources, but those sources must be publicly accessible.

Regional API endpoint

1. The host name of an API that is deployed to the specified region and intended to serve clients,
such as EC2 instances, in the same AWS region.
2. API requests are targeted directly to the region-specific API Gateway without going through any
CloudFront distribution.
3. For in-region requests, a regional endpoint bypasses the unnecessary round trip to a CloudFront
distribution.
4. In addition, you can apply latency-based routing on regional endpoints to deploy an API to
multiple regions using the same regional API endpoint configuration, set the same custom
domain name for each deployed API, and configure latency-based DNS records in Route 53 to
route client requests to the region that has the lowest latency.

Benefits to this variant are:


 You can deploy your own CloudFront distribution in front of your API Gateway. This
distribution can have a WAF.
 If your API Gateway is going to be accessed from the same AWS region, the Regional API
Gateway will have less latency.

When to use which API Gateway

REFERENCES:
Detailed Overall Comparison (Important)

https://www.sentialabs.io/2018/09/13/API-Gateway-Types-Compared.html

API Gateway Concepts

https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-basic-concept.html

Edge Location

https://www.edureka.co/community/600/what-is-an-edge-location-in-aws

You might also like