Skip to main content

🧠 AWS EC2 Instance IAM role is not attached - prod.logic.yaml🟢

Uses

Test Results 🟢

Generated at: 2026-06-06T12:02:43.029984626Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟢a01✔️ 99✔️ isDisappeared(CA10__disappearanceTime__c)✔️ null
🟢a02✔️ 199✔️ CA10A1__iamInstanceProfile__r.CA10A1__roleArn__c.isNotEmpty()✔️ null
🟢a03✔️ 200✔️ otherwise✔️ null
🟢a04✔️ 200✔️ otherwise✔️ null

Generation Bundle

FileMD5
Open/ce/ca/aws/ec2/instance-iam-role/policy.yaml8B476A80EC6CEE47EA33466C9F52F67E
Open/ce/ca/aws/ec2/instance-iam-role/prod.logic.yamlD50B710C30333B670D1C9A6E7C454FFE
Open/ce/ca/aws/ec2/instance-iam-role/test-data.json82158A0BAC6C4A61DE1FFDDCF0ED5C35
Open/types/CA10__CaAwsInstance__c/object.extracts.yaml91EF62776BC2E60A02CA42F4B2811688

Available Commands

repo-manager policies generate FULL /ce/ca/aws/ec2/instance-iam-role/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/ec2/instance-iam-role/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/ec2/instance-iam-role/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/ec2/instance-iam-role/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/ec2/instance-iam-role/prod.logic.yaml

Content

Open File

---
inputType: "CA10__CaAwsInstance__c"
testData:
- file: test-data.json
importExtracts:
- file: /types/CA10__CaAwsInstance__c/object.extracts.yaml
conditions:
- status: "COMPLIANT"
currentStateMessage: "The instance has an IAM role attached through its instance profile."
check:
NOT_EMPTY:
arg:
FIELD:
path: "CA10A1__iamInstanceProfile__r.CA10A1__roleArn__c"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "The instance does not have an IAM role attached."
remediationMessage: "Attach an IAM role to the instance."