Skip to main content

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

Uses​

Test Results πŸŸ’β€‹

Generated at: 2026-02-10T22:32:28.171862617Z 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 Bundle​

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

Available Commands​

repo-manager policies generate FULL /ce/ca/aws/account/aws-support-role/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/account/aws-support-role/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/account/aws-support-role/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/account/aws-support-role/prod.logic.yaml
# Execute tests
repo-manager 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: "The AWSSupportAccess IAM policy for managing incidents with AWS Support does not exist."
remediationMessage: "Create the AWSSupportAccess IAM policy."
check:
RELATED_LIST_HAS:
status: "INCOMPLIANT"
relationshipName: "CA10__AWS_IAM_Policies__r"
- status: "INCOMPLIANT"
currentStateMessage: "The AWSSupportAccess IAM policy is not attached to any IAM role."
remediationMessage: "Attach the AWSSupportAccess IAM policy to an IAM role dedicated to managing AWS Support incidents."
check:
RELATED_LIST_HAS:
status: "INCOMPLIANT"
relationshipName: "CA10__AWS_IAM_Role_Policy_Attachments__r"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "There are no active IAM roles or IAM policies."
relatedLists:
- relationshipName: "CA10__AWS_IAM_Policies__r"
importExtracts:
- file: /types/CA10__CaAwsIamPolicy__c/object.extracts.yaml
conditions:
- status: "COMPLIANT"
currentStateMessage: "This is the AWSSupportAccess IAM policy."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__arn__c"
right:
TEXT: arn:aws:iam::aws:policy/AWSSupportAccess
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "The 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: "An IAM role is 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: "No IAM role is attached to the AWSSupportAccess IAM policy."