Skip to main content

🧠 AWS Support Role is not created - prod.logic.yaml 🟒

  • Contextual name: 🧠 prod.logic.yaml 🟒
  • ID: /ce/ca/aws/account/aws-support-role/prod.logic.yaml
  • Located in: πŸ“ AWS Support Role is not created 🟒

Flags​

Input Type​

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

Uses​

Test Results πŸŸ’β€‹

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

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 199βœ”οΈ CA10__AWS_IAM_Policies__r.has(COMPLIANT) && CA10__AWS_IAM_Role_Policy_Attachments__r.has(COMPLIANT)βœ”οΈ null
🟒test2βœ”οΈ 299βœ”οΈ CA10__AWS_IAM_Policies__r.has(INCOMPLIANT)βœ”οΈ null
🟒test3βœ”οΈ 399βœ”οΈ CA10__AWS_IAM_Role_Policy_Attachments__r.has(INCOMPLIANT)βœ”οΈ null
🟒test4βœ”οΈ 399βœ”οΈ CA10__AWS_IAM_Role_Policy_Attachments__r.has(INCOMPLIANT)βœ”οΈ null
🟒test5βœ”οΈ 400βœ”οΈ otherwiseβœ”οΈ null
🟒test6βœ”οΈ 400βœ”οΈ otherwiseβœ”οΈ null

Generation​

FileMD5
Open/ce/ca/aws/account/aws-support-role/policy.yaml8B6AB7E29A41168D2FC9884CD4EEDB26
Open/ce/ca/aws/account/aws-support-role/prod.logic.yamlA4BCADD7E16F02338710B9A3225C4A36
Open/types/CA10__CaAwsIamRolePolicyAttachment__c/object.extracts.yaml3B1645AD49B1ED98D792A387F70B5AA5
Open/types/CA10__CaAwsIamPolicy__c/object.extracts.yamlC48327B50CE4EB54B3C6B2B464134BB3
Open/ce/ca/aws/account/aws-support-role/test-data.jsonE56AD00C43DCB0E44A11562E7B007179

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/aws/account/aws-support-role/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/account/aws-support-role/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/account/aws-support-role/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/account/aws-support-role/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/aws/account/aws-support-role/prod.logic.yaml

Content​

Open File

---
inputType: "CA10__CaAwsAccount__c"
testData:
- file: test-data.json
conditions:
- status: "COMPLIANT"
currentStateMessage: "The AWS Account has a Support role for managing incidents with AWS Support."
check:
AND:
args:
- RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10__AWS_IAM_Policies__r"
- RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10__AWS_IAM_Role_Policy_Attachments__r"
- status: "INCOMPLIANT"
currentStateMessage: "AWSSupportAccess IAM Policy for managing incidents with AWS Support does not exist."
remediationMessage: "Consider creating AWSSupportAccess IAM Policy."
check:
RELATED_LIST_HAS:
status: "INCOMPLIANT"
relationshipName: "CA10__AWS_IAM_Policies__r"
- status: "INCOMPLIANT"
currentStateMessage: "AWSSupportAccess IAM Policy is not attached to any IAM role."
remediationMessage: "Consider attaching AWSSupportAccess IAM Policy to an IAM Role dedicated to managing incidents with AWS Support."
check:
RELATED_LIST_HAS:
status: "INCOMPLIANT"
relationshipName: "CA10__AWS_IAM_Role_Policy_Attachments__r"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "There are no active IAM Roles and IAM Policies."
relatedLists:
- relationshipName: "CA10__AWS_IAM_Policies__r"
importExtracts:
- file: /types/CA10__CaAwsIamPolicy__c/object.extracts.yaml
conditions:
- status: "COMPLIANT"
currentStateMessage: "This is an AWSSupportAccess IAM Policy."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__arn__c"
right:
TEXT: arn:aws:iam::aws:policy/AWSSupportAccess
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "AWSSupportAccess IAM Policy is not found."
- relationshipName: "CA10__AWS_IAM_Role_Policy_Attachments__r"
importExtracts:
- file: /types/CA10__CaAwsIamRolePolicyAttachment__c/object.extracts.yaml
conditions:
- status: "COMPLIANT"
currentStateMessage: "There is an AWS IAM Role attached to the AWSSupportAccess IAM Policy."
check:
AND:
args:
- NOT_EMPTY_LOOKUP: "CA10__role__r"
- NOT_EMPTY_LOOKUP: "CA10__policy__r"
- IS_EQUAL:
left:
EXTRACT: CA10__policyArn__c
right:
TEXT: arn:aws:iam::aws:policy/AWSSupportAccess
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "There is no AWS IAM Role attached to AWSSupportAccess IAM Policy."