# Ensure CloudFront Distributions Have Origin Failover Enabled

- Source: https://support.icompaas.com/support/solutions/articles/62000233489-ensure-cloudfront-distributions-have-origin-failover-enabled
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [AWS Checks New Version](https://support.icompaas.com/support/solutions/62000112673) › [AWS New Checks](https://support.icompaas.com/support/solutions/folders/62000169206)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

Profile Applicability: Level 2

#### Description

Amazon CloudFront origin failover ensures high availability by automatically switching to a secondary origin if the primary origin is unavailable or returns specific HTTP response status codes that indicate a failure. This feature is crucial for maintaining uninterrupted service and improving the reliability of your web applications.

#### Rationale

-   High Availability: Ensures continuous service by automatically switching to a secondary origin when the primary origin fails.
    
-   Improved Reliability: Reduces the risk of downtime and service interruptions.
    
-   Enhanced User Experience: Provides a seamless experience for users by preventing service disruptions.
    

#### Impact

Pros:

-   Ensures high availability and continuous service.
    
-   Reduces the risk of downtime and service interruptions.
    
-   Enhances user experience by preventing disruptions.
    

Cons:

-   May require additional configuration and testing.
    
-   Potential temporary disruption during the setup process.
    

#### Default Value

By default, origin failover is not enabled for CloudFront distributions. It must be explicitly configured with a primary and secondary origin.

#### Pre-Requisite

IAM Permissions:

-   cloudfront:GetDistribution
    
-   cloudfront:UpdateDistribution
    
-   AWS CLI installed and configured.
    

#### Remediation

#### Test Plan: 

Using AWS Console:

1.  Sign in to the AWS Management Console.
    
2.  Navigate to the CloudFront Dashboard.
    
3.  Click on the Distributions tab in the top left navigation menu.
    
4.  Select the Distribution you want to audit.
    
5.  Click on the Origins tab in the top menu.
    
6.  Check if an origin group is configured with a primary and secondary origin.
    

Using AWS CLI:

Check Origin Failover Status:

aws cloudfront get-distribution --id <distribution-id> --query 'Distribution.DistributionConfig.Origins.Items\[\*\].OriginGroup'

#### Implementation Steps: 

Using AWS Console:

1.  Sign in to the AWS Management Console.
    
2.  Navigate to the CloudFront Dashboard.  
    ![](https://support.icompaas.com/assets/kb/b240ceb098b1047a.png)
    
3.  Click on the Distributions tab in the top left navigation menu.
    
4.  Select the Distribution you want to modify.  
    ![](https://support.icompaas.com/assets/kb/19d1619e6e7439f5.png)
    
5.  Click on the Origins tab in the top menu.
    
6.  Create an origin group with a primary and secondary origin.  
    ![](https://support.icompaas.com/assets/kb/a622886434756cf7.png)
    
7.  Configure the cache behavior to use the origin group.  
    ![](https://support.icompaas.com/assets/kb/49b62282457e1674.png)
    
8.  Save the changes.
    

Using AWS CLI:

1.  Save the JSON file document named distconfig-origin-failover.json.
    

Update the distribution:

aws cloudfront update-distribution --id <distribution-id> --distribution-config file://distconfig-origin-failover.json

  

#### Backout Plan

**Using AWS Console:**

1.  Navigate to the CloudFront Dashboard.
    
2.  Select the Distribution.
    
3.  Click Edit Attributes.  
    ![](https://support.icompaas.com/assets/kb/ebf1c28ae910ece8.png)
    
4.  Remove the origin group configuration.
    
5.  Click Save changes to save the changes.
    

Using AWS CLI:

aws cloudfront update-distribution --id <distribution-id> --distribution-config file://distconfig-original.json

####   

#### **References**

-   [AWS CloudFront Origin Failover Documentation](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/high_availability_origin_failover.html)
    
-   [CloudFront Origin Failover Enabled](https://docs.aws.amazon.com/config/latest/developerguide/cloudfront-origin-failover-enabled.html)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
