Skip to main content

🧠 AWS API Gateway API Access Logging in CloudWatch is not enabled - prod.logic.yaml 🟠🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“• AWS API Gateway APICA10__CaAwsApiGatewayRestApi__c213

Uses​

Test Results πŸŸ’β€‹

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

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 99βœ”οΈ isDisappeared(CA10__disappearanceTime__c)βœ”οΈ null
🟒test2βœ”οΈ 199βœ”οΈ CA10__AWS_API_Gateway_Stages__r.has(INCOMPLIANT)βœ”οΈ null
🟒test3βœ”οΈ 199βœ”οΈ CA10__AWS_API_Gateway_Stages__r.has(INCOMPLIANT)βœ”οΈ null
🟒test4βœ”οΈ 199βœ”οΈ CA10__AWS_API_Gateway_Stages__r.has(INCOMPLIANT)βœ”οΈ null
🟒test5βœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null
🟒test6βœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null

Generation​

FileMD5
Open/ce/ca/aws/apigateway/api-access-logging/policy.yaml27EB0EAEDBCF4B965C9DEB6AB46A20B3
Open/ce/ca/aws/apigateway/api-access-logging/prod.logic.yamlA85D538DFDC61E4941F09CA061EC263A
Open/ce/ca/aws/apigateway/api-access-logging/test-data.json80C72546B58BBFE5F161E6CFC7DED26B

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/aws/apigateway/api-access-logging/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/apigateway/api-access-logging/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/apigateway/api-access-logging/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/apigateway/api-access-logging/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/aws/apigateway/api-access-logging/prod.logic.yaml

Content​

Open File

---
inputType: "CA10__CaAwsApiGatewayRestApi__c"
testData:
- file: test-data.json
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "There is at least one related API Stage where CloudWatch Access Logs are not enabled."
remediationMessage: "Consider enabling CloudWatch Access Logs for the API Stage."
check:
RELATED_LIST_HAS:
relationshipName: "CA10__AWS_API_Gateway_Stages__r"
status: "INCOMPLIANT"
otherwise:
status: "COMPLIANT"
currentStateMessage: "API is compliant"
relatedLists:
- relationshipName: "CA10__AWS_API_Gateway_Stages__r"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "CloudWatch Access Logs are not enabled for this API Stage."
remediationMessage: "Consider enabling CloudWatch Access Logs for this API Stage."
check:
IS_EMPTY_LOOKUP: "CA10__accessLoggingDestination__r"
otherwise:
status: "COMPLIANT"
currentStateMessage: "CloudWatch Access Logs are enabled."