Skip to main content

🧠 AWS Lambda Function is not in multiple Availability Zones - prod.logic.yaml🟒

Uses​

Test Results πŸŸ’β€‹

Generated at: 2026-01-17T12:02:54.415433440Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 99βœ”οΈ isDisappeared(CA10__disappearanceTime__c)βœ”οΈ null
🟒test2βœ”οΈ 199βœ”οΈ CA10__AWS_Lambda_Function_Versions__r.has(COMPLIANT)βœ”οΈ null
🟒test3βœ”οΈ 299βœ”οΈ CA10__vpcId__c.isEmpty()βœ”οΈ null
🟒test4βœ”οΈ 399βœ”οΈ CA10__AWS_Lambda_Function_Subnet_Links__r.count(COMPLIANT) < number(2.0)βœ”οΈ null
🟒test5βœ”οΈ 400βœ”οΈ otherwiseβœ”οΈ null

Generation Bundle​

FileMD5
Open/ce/ca/aws/lambda/function-multi-az/policy.yaml4C8F353219B32A635DFD6D19A6A04FCA
Open/ce/ca/aws/lambda/function-multi-az/prod.logic.yaml9F6105ACEDF004882CA998D4241BA05C
Open/ce/ca/aws/lambda/function-multi-az/test-data.json7A2F4B5F37D7F424309C12BC54FBA1D9
Open/types/CA10__CaAwsLambdaFunction__c/object.extracts.yamlAC42D0E20DDB5A13477C5EE7A9A969D6

Available Commands​

repo-manager policies generate FULL /ce/ca/aws/lambda/function-multi-az/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/lambda/function-multi-az/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/lambda/function-multi-az/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/lambda/function-multi-az/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/lambda/function-multi-az/prod.logic.yaml

Content​

Open File

---
inputType: "CA10__CaAwsLambdaFunction__c"
importExtracts:
- file: "/types/CA10__CaAwsLambdaFunction__c/object.extracts.yaml"
testData:
- file: "test-data.json"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "Lambda@Edge functions do not support VPC association."
check:
RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10__AWS_Lambda_Function_Versions__r"
- status: "INAPPLICABLE"
currentStateMessage: "The Lambda function is not associated with a VPC."
check:
IS_EMPTY:
arg:
FIELD:
path: "CA10__vpcId__c"
- status: "INCOMPLIANT"
currentStateMessage: "The Lambda function is associated with only one Availability Zone."
remediationMessage: "Update the Lambda function configuration to include subnets in at least two different AZs."
check:
LESS_THAN:
left:
RELATED_LIST_COUNT:
status: "COMPLIANT"
relationshipName: "CA10__AWS_Lambda_Function_Subnet_Links__r"
right:
NUMBER: 2.0
otherwise:
status: "COMPLIANT"
currentStateMessage: "The Lambda function is associated with a VPC."
relatedLists:
- relationshipName: "CA10__AWS_Lambda_Function_Versions__r"
conditions:
- status: "COMPLIANT"
currentStateMessage: "This is Lambda@Edge function."
check:
RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10__AWS_CloudFront_Lambda_Func_Associations__r"
otherwise:
status: "INAPPLICABLE"
currentStateMessage: "This function version does not have an association with CloudFront."
relatedLists:
- relationshipName: "CA10__AWS_CloudFront_Lambda_Func_Associations__r"
conditions: []
otherwise:
status: "COMPLIANT"
currentStateMessage: "This is Lambda@Edge function."
- relationshipName: "CA10__AWS_Lambda_Function_Subnet_Links__r"
conditions: []
otherwise:
status: "COMPLIANT"
currentStateMessage: "This is a subnet attached to the function."