Stop AWS CloudFront stripping custom domain when re-directing

161 Views Asked by At

I have CloudFront caching a Django Lambda (Zappa) deployment. Everything is working fine except that when I visit my custom domain such as www.example.com it is re-directing to the Lambda execution URL like https://1234xb7gmc.execute-api.eu-west-2.amazonaws.com/ rather than keeping the custom domain.

I think the flow is as follows: Custom Domain > CloudFront Domain > Lambda Domain

I just want it so that at the end, the user is still using the custom domain and not the Lambda one (even though behind the scenes they're being invoked).

Is there a name for this behavior?

0

There are 0 best solutions below