Skip to main content

🧠 AWS CloudFront Web Distribution Default Root Object is not configured - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“• AWS CloudFront DistributionCA10__CaAwsDistribution__c417

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-07-08T23:23:01.240965401Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 99βœ”οΈ isDisappeared(CA10__disappearanceTime__c)βœ”οΈ null
🟒test2βœ”οΈ 299βœ”οΈ extract('CA10__defaultRootObject__c').isEmpty()βœ”οΈ null
🟒test3βœ”οΈ 300βœ”οΈ otherwiseβœ”οΈ null

Generation​

FileMD5
Open/ce/ca/aws/cloudfront/distribution-default-root-object/policy.yamlA733811FF5494CBE07BA7BD6631935EA
Open/ce/ca/aws/cloudfront/distribution-default-root-object/prod.logic.yaml6646FC907BA9915441CCAD562BC64277
Open/ce/ca/aws/cloudfront/distribution-default-root-object/test-data.json42957694E2E6953D3EAC8997B6AF03C1
Open/types/CA10__CaAwsDistribution__c/object.extracts.yaml312E8E3ABFEE53092D8EF1E754EE76B1

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/aws/cloudfront/distribution-default-root-object/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/cloudfront/distribution-default-root-object/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/cloudfront/distribution-default-root-object/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/cloudfront/distribution-default-root-object/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/aws/cloudfront/distribution-default-root-object/prod.logic.yaml

Content​

Open File

---
inputType: "CA10__CaAwsDistribution__c"
importExtracts:
- file: "/types/CA10__CaAwsDistribution__c/object.extracts.yaml"
testData:
- file: "test-data.json"
recordTypes:
- "caWebDistribution"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "The CloudFront Distribution does not have a Default Root Object configured."
remediationMessage: "Consider specifying a default root object to avoid exposing the contents of the Distribution."
check:
IS_EMPTY:
arg:
EXTRACT: "CA10__defaultRootObject__c"
otherwise:
status: "COMPLIANT"
currentStateMessage: "The CloudFront Distribution has a Default Root Object configured."