amazon-web-servicesamazon-cloudfrontaws-lambda-edgecloudfront-functions

Amazon CloudFront - What is the running order of Continous Deployment and Functions?


Amazon CloudFront has these 2 features:

For a scenario where:

My question is, does


Solution

  • Short answer: Continuous Deployment policy is not reevaluated after a viewer or request change. You cannot dynamically route requests from Production to Staging distribution with your Lambda@Edge or CloudFront functions. Only built-in features: static headers or weight.

    As you said, the Continuous Deployment feature is on top of CloudFront distribution. So its routing policy is executed before reaching the target distribution. Then, the behaviors and its related Lambda@Edge, CloudFront functions are processed.

    Continuous Deployment policy is not reevaluated after a viewer or request change. Any manipulations are done within this distribution. You can consider the Staging and Production CloudFront distributions as isolated, without communication or shared configuration.