CloudFront Dynamic Origin Selection

0

is there a scalable way to do dynamic origin selection in Cloudfront (based on request header / response header / cookie / domain name) other than using Lambda@Edge with viewer-request trigger?

I have a partner trying to implement a globally available endpoint for a multi-tenant API supporting 10k+ tenants spread over 30+ application instances in 5 AWS regions (each tenant has a single home app instance).

The routing key would be (preferably) a JWT token claim or a request header; however, application can be modified to play along by e.g. returning a customized response header, cookie or something else.

The Lambda@Edge-based solution looks straightforward, however, partner is looking toward a solution that would optimize the cost.

AWS
asked 4 years ago630 views
1 Answer
0
Accepted Answer

Have you explored whether or not AWS Global Accelerator meets the requirements?

From what you're describing the main objective of your customer is to accelerate their global application. Knowing that regardless of where your users are located, AWS Global Accelerator intelligently routes traffic to the closest edge location via Anycast and then to the closest regional endpoint that provides the best application performance it may be a great fit given the nature of the application and other requirements are met.

In this case it's not necessary to have complexity in the form of building logic around a routing key and L@E. Moreover, the main goal you mentioned - cost efficiency - should be successfully achieved.

AWS
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions