Serving APIs from Lambda@Edge offers more latency benefit than serving APIs from API-Gateway + Lambda stack, if my understanding is correct.
Plus, cost of API-Gateway ($3.5/million call) + Lambda ($0.2/million call) == $3.7 / million call seems to be more expensive than Lambda@Edge ($0.6 / million call).
If both of the above observations are true, shouldn't we all migrate our API-Gateway + Lambda (for those who use this stack) to lambda@edge stack?
Lambda@Edge is primarily event driven for requests, yes the latency is reduced but it is designed to be used with an origin. Even if you have the Lambda@Edge function your CloudFront distribution would still need to reach out to the origin.
When the origin is an API Gateway (with or without a Lambda) there are so many benefits come with it such as:
If this was all needed to be done by Lambda@Edge then you would need to design, develop and maintain these features.
The price you refer to is for REST API, bare in mind there 3 kinds of API the cheapest is HTTP API which costs $1.00 per million requests.
Lambda@Edge has many limitations as compared to regular lambda. For examples:
Thus, it would be difficult in many cases to migrate to Lambda@Edge and to give up all these benefits of regular lambda.