Multi-region data sovereignty deployment - Routing Alternatives

0

I need to separate EU and USA deployments due to data sovereignty requirements and allow easy, secure access.

The requirements are:

  1. Separate AWS accounts, separate EKS clusters, no data relation whatsoever between the deployments and no shared infrastructure or control planes.
  2. Upon signup, the customer is branded as EU or USA by my team and stays this way forever, no matter where they access the application from - they always stay with that initial choice of location.
  3. The DNS cannot be listed, meaning you can't have the list of customers simply listed in a DNS lookup.

My question is about the routing. A customer accesses the system using DNS: customer1.mydomain.com with a wildcard SSL certificate *.mydomain.com and I want to have two options, one with customer1.eu.mydomain.com and the other with customer1.mydomain.com.

What are my options for routing the customer to the correct deployment? I was thinking of:

  1. CloudFront Functions with a static list of customers and their EU/USA indication
  2. Lambda@Edge with a dynamic resolve (loading the list of customers from S3, instead of having a static list inside the function)
  3. Route 53 setup - straightforward listing of customerA.mydomain.com to EU, for example, and customerB.mydomain.com to US (I'm afraid this might be exposed to lookups).

Thanks in advance!

1 Answer
1
Accepted Answer

For such a multi-region data sovereignty requirement, you need a solution that routes your customers to the correct regional endpoint based on their designated region without exposing customer lists through DNS lookups. Here are some approaches that align with AWS best practices:

  1. Route 53 Geoproximity Routing with Traffic Policies:

    • Use Route 53’s geoproximity routing to direct traffic based on the geographic location of your users.
    • Implement traffic policies to handle complex routing requirements.
    • This method does not expose any customer lists, as the routing is based on the location of the DNS queries, not a list of customers.
    • However, this doesn’t meet the requirement for users to stick to their initial region after signup, as the routing is dynamic.
  2. AWS Global Accelerator:

    • Global Accelerator provides static IP addresses that act as a fixed entry point to your applications hosted in multiple AWS Regions.
    • It uses the AWS global network to optimize the path to your application, which can improve performance.
    • You can use application-level logic to route the customer to the appropriate regional endpoint based on their signup information.
    • This way, you won’t expose any DNS listings, and the application logic remains hidden.
  3. Lambda@Edge for Custom Routing:

    • Using Lambda@Edge allows you to run your code in AWS locations globally without provisioning or managing servers, allowing you to execute functions that customize the content that CloudFront delivers.
    • You can securely store your EU/USA customer designation in an encrypted S3 bucket or AWS Systems Manager Parameter Store, and your Lambda@Edge function can query this storage to determine the correct routing.
    • This approach ensures that customer data is not exposed through DNS and enables dynamic resolution without a static list in the function.
  4. CloudFront Functions for Lightweight Routing:

    • CloudFront Functions run closer to the user, at CloudFront edge locations, and are suitable for simple header manipulations, URL rewrites/redirects, and other lightweight processing.
    • You could use a CloudFront function to inspect the incoming requests and rewrite the URL to point to the correct regional domain based on a static mapping within the function.
    • While you can use a static list within CloudFront Functions, this might not be scalable or easy to manage if the list changes frequently.
  5. Client-Side Routing:

    • Implement client-side logic in your application to direct users to the correct regional endpoint after login. This way, the initial DNS query goes to a generic endpoint, and subsequent requests are routed based on the logic in the application.
    • This requires secure handling of the client logic and ensuring it aligns with data sovereignty and privacy regulations.

Each of these methods has its trade-offs regarding management overhead, cost, performance, and complexity. For instance, Lambda@Edge provides more flexibility and can handle dynamic lists, but it introduces extra latency compared to a straightforward DNS routing approach. CloudFront Functions are more limited in capability but offer lower latency.

When implementing any of these solutions, ensure that you are encrypting sensitive data at rest and in transit, and that you are following the principle of least privilege when granting access to AWS resources.

To maintain compliance with data sovereignty requirements, you should also ensure that no personal data is transferred between regions unless it is encrypted and the transfer is compliant with local regulations (like GDPR in the EU). Consider consulting with a legal expert to ensure that your solution complies with all relevant data protection laws.

For detailed implementation guides and the latest best practices, consult the AWS documentation for Route 53, Global Accelerator, Lambda@Edge, and CloudFront Functions.

profile pictureAWS
Obijan
answered 6 months ago
  • Thank you for the comprehensive answer. Two follow-up questions, if I may:

    1. Route 53 - is it possible to do a super-simple routing without exposing customer information?
    2. Global Accelerator - what do you mean by "application-level logic to route"? Where will this take place?

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