githubEdit

Why can't I change CloudFront behavior origins in AWS Console when origins share the same domain?

When working with CloudFront behaviors that have multiple origins sharing the same domain, you may encounter an issue where the AWS Console automatically selects the first matching origin instead of your desired choice. Understanding the Behavior The AWS Console has a limitation where if multiple origins share the same domain: The console will automatically bind to the first matching Origin ID with that domain You cannot manually select a different origin with the same domain through the console interface Solutions There are three ways to update the origin for a CloudFront behavior when dealing with same-domain origins: Use the DuploCloud portal to make the change (recommended) Use the AWS CLI to update the configuration Edit the JSON configuration directly in CloudFront aws cloudfront get-distribution-config --id YOUR_DIST_ID > dist.json Make the adjustment to dist.json aws cloudfront update-distribution --id YOUR_DIST_ID --if-match (jq -r .ETag dist.json) --distribution-config file://dist.json This is a known limitation of the AWS Console interface and not a bug. The underlying configuration can still be modified through alternative methods listed above. Additional Notes Custom header policies and other CloudFront behavior settings can be configured through the DuploCloud portal, even when the AWS Console prevents direct origin selection.

Last updated

Was this helpful?