π§ AWS SageMaker Endpoint has less than 2 instances - prod.logic.yamlπ’
- Contextual name: π§ prod.logic.yamlπ’
- ID:
/ce/ca/aws/sagemaker/endpoint-instance-count/prod.logic.yaml - Tags:
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Usesβ
- π AWS SageMaker Endpoint
- π AWS SageMaker Endpoint - object.extracts.yaml
- π AWS SageMaker Endpoint Config - object.extracts.yaml
- π§ͺ test-data.json
Test Results π’β
Generated at: 2026-01-24T12:02:26.439701062Z Open
| Result | Id | Condition Index | Condition Text | Runtime Error |
|---|---|---|---|---|
| π’ | test1 | βοΈ 199 | βοΈ extract('CA10A1__status__c') != 'InService' | βοΈ null |
| π’ | test2 | βοΈ 399 | βοΈ extract('caJsonFrom__productionVariantsJson__c').jsonQueryText('length([?initialInstanceCount < 2])') > number(0.0) | βοΈ null |
| π’ | test3 | βοΈ 299 | βοΈ isEmptyLookup('CA10A1__endpointConfig__r') | βοΈ null |
| π’ | test4 | βοΈ 500 | βοΈ otherwise | βοΈ null |
| π’ | test5 | βοΈ 304 | βοΈ CA10A1__productionVariantsJson__c.delegatedTo(CA10A1__productionVariantsJson__c).isEmpty() | βοΈ null |
| π’ | test6 | βοΈ 304 | βοΈ CA10A1__productionVariantsJson__c.delegatedTo(CA10A1__productionVariantsJson__c).isEmpty() | βοΈ null |
| π’ | test7 | βοΈ 499 | βοΈ extract('caJsonFrom__productionVariantsJson__c').jsonQueryText('length([?initialInstanceCount > 1])') > number(0.0) | βοΈ null |
Generation Bundleβ
| File | MD5 | |
|---|---|---|
| Open | /ce/ca/aws/sagemaker/endpoint-instance-count/policy.yaml | 5122F1CB7CD54E5BF9DA79CE77FDA4FF |
| Open | /ce/ca/aws/sagemaker/endpoint-instance-count/prod.logic.yaml | DAFB1379E318D4D93521C41327C5E763 |
| Open | /ce/ca/aws/sagemaker/endpoint-instance-count/test-data.json | 98698444856473108388629ABB153214 |
| Open | /types/CA10A1__CaAwsSageMakerEndpoint__c/object.extracts.yaml | 6FEF5F0D1482FCEDF426200AE2C8E910 |
| Open | /types/CA10A1__CaAwsSageMakerEndpointConfig__c/object.extracts.yaml | C98A8ED84E6D2328252FC7FA00A80C30 |
Available Commandsβ
repo-manager policies generate FULL /ce/ca/aws/sagemaker/endpoint-instance-count/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/sagemaker/endpoint-instance-count/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/sagemaker/endpoint-instance-count/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/sagemaker/endpoint-instance-count/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/sagemaker/endpoint-instance-count/prod.logic.yaml
Contentβ
---
inputType: "CA10A1__CaAwsSageMakerEndpoint__c"
testData:
- file: "test-data.json"
importExtracts:
- file: "/types/CA10A1__CaAwsSageMakerEndpoint__c/object.extracts.yaml"
- file: "/types/CA10A1__CaAwsSageMakerEndpointConfig__c/object.extracts.yaml"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The SageMaker Endpoint is not in service."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10A1__status__c"
right:
TEXT: "InService"
- status: "UNDETERMINED"
currentStateMessage: "The Endpoint Configuration or its production variants are not present in the CMDB."
check:
IS_EMPTY_LOOKUP: "CA10A1__endpointConfig__r"
- status: "INCOMPLIANT"
currentStateMessage: "At least one production variant in the endpoint configuration has an instance count less than 2."
remediationMessage: "Increase the instance count for all production variants to at least 2."
check:
# Evaluates the JSON array of variants to see if any have initialInstanceCount < 2
GREATER_THAN:
left:
JSON_QUERY_NUMBER:
arg:
EXTRACT: "caJsonFrom__productionVariantsJson__c"
expression: "length([?initialInstanceCount < `2`])"
undeterminedIf:
evaluationError: "Failed to query the production variants JSON."
resultTypeMismatch: "Query did not return a number."
right:
NUMBER: 0
- status: "COMPLIANT"
currentStateMessage: "All production variants for this endpoint have at least two instances configured."
check:
# Evaluates the JSON array of variants to see if any have initialInstanceCount > 1
GREATER_THAN:
left:
JSON_QUERY_NUMBER:
arg:
EXTRACT: "caJsonFrom__productionVariantsJson__c"
expression: "length([?initialInstanceCount > `1`])"
undeterminedIf:
evaluationError: "Failed to query the production variants JSON."
resultTypeMismatch: "Query did not return a number."
right:
NUMBER: 0
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unable to determine the initial instance count of the Endpoint Config."