Skip to main content

🧠 AWS Account IAM Access Analyzer is not enabled for all regions - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“• AWS AccountCA10__CaAwsAccount__c1111

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-04-24T23:44:08.494994346Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null
🟒test2βœ”οΈ 199βœ”οΈ CA10A1__AWS_IAM_Access_Analyzers__r.count(COMPLIANT) == CA10__AWS_Account_Regions__r.count(COMPLIANT)βœ”οΈ null

Generation​

FileMD5
Open/ce/ca/aws/account/iam-external-access-analyzer-for-all-regions/policy.yaml60B6AA2A70CCCAB14C844CC20D1C6E6B
Open/ce/ca/aws/account/iam-external-access-analyzer-for-all-regions/prod.logic.yaml2C6E705582C8B0BA2E0960984E485181
Open/types/CA10A1__CaAwsIamAccessAnalyzer__c/object.extracts.yaml72D380FE6BF927AAF32782CD4F6277F7
Open/ce/ca/aws/account/iam-external-access-analyzer-for-all-regions/test-data.json98EEF7F281AADBE8F102C11F1CDE7AB7
Open/types/CA10__CaAwsAccountRegion__c/object.extracts.yamlB5D54D4844B8E77238E14E730ABEE3C4
Open/types/CA10__CaAwsAccount__c/object.extracts.yamlFF575E27BEBAF3C8E85968E44798945B

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/aws/account/iam-external-access-analyzer-for-all-regions/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/account/iam-external-access-analyzer-for-all-regions/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/account/iam-external-access-analyzer-for-all-regions/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/account/iam-external-access-analyzer-for-all-regions/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/aws/account/iam-external-access-analyzer-for-all-regions/prod.logic.yaml

Content​

Open File

---
inputType: "CA10__CaAwsAccount__c"
testData:
- file: test-data.json
importExtracts:
- file: /types/CA10__CaAwsAccount__c/object.extracts.yaml
conditions:
- status: "COMPLIANT"
currentStateMessage: "IAM Access analyzer is enabled for all regions."
check:
IS_EQUAL:
left:
RELATED_LIST_COUNT:
status: "COMPLIANT"
relationshipName: "CA10A1__AWS_IAM_Access_Analyzers__r"
right:
RELATED_LIST_COUNT:
status: "COMPLIANT"
relationshipName: "CA10__AWS_Account_Regions__r"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "IAM Access analyzer is not enabled for all regions."
remediationMessage: "Configure the IAM Access analyzer in each active region."
relatedLists:
- relationshipName: "CA10A1__AWS_IAM_Access_Analyzers__r"
importExtracts:
- file: /types/CA10A1__CaAwsIamAccessAnalyzer__c/object.extracts.yaml
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "This is not an External Access Analyzer."
check:
AND:
args:
- NOT_EQUAL:
left:
EXTRACT: "CA10A1__type__c"
right:
TEXT: "ACCOUNT"
- NOT_EQUAL:
left:
EXTRACT: "CA10A1__type__c"
right:
TEXT: "ORGANIZATION"
- status: "COMPLIANT"
currentStateMessage: "Active AWS IAM External Access Analyzer."
check:
IS_EQUAL:
left:
EXTRACT: "CA10A1__status__c"
right:
TEXT: "ACTIVE"
otherwise:
status: "INAPPLICABLE"
currentStateMessage: "There is no active AWS IAM External Access Analyzer."
- relationshipName: "CA10__AWS_Account_Regions__r"
importExtracts:
- file: /types/CA10__CaAwsAccountRegion__c/object.extracts.yaml
conditions:
- status: "COMPLIANT"
currentStateMessage: "Active AWS Account Region."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__status__c"
right:
TEXT: "not-opted-in"
otherwise:
status: "INAPPLICABLE"
currentStateMessage: "This AWS Account Region not active."