Skip to main content

🧠 AWS Backup Recovery Point is expired and failed to delete - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“• AWS Backup Recovery PointCA10A1__CaAwsBackupRecoveryPoint__c311

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-07-11T00:36:18.965012730Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 99βœ”οΈ isDisappeared(CA10A1__disappearanceTime__c)βœ”οΈ null
🟒test2βœ”οΈ 199βœ”οΈ extract('CA10A1__status__c') != 'EXPIRED'βœ”οΈ null
🟒test3βœ”οΈ 299βœ”οΈ extract('CA10A1__calcLifecycleDeleteAt__c').isEmpty()βœ”οΈ null
🟒test4βœ”οΈ 399βœ”οΈ extract('CA10A1__calcLifecycleDeleteAt__c').beyondLastDays(2)βœ”οΈ null
🟒test5βœ”οΈ 400βœ”οΈ otherwiseβœ”οΈ null
🟒test6βœ”οΈ 400βœ”οΈ otherwiseβœ”οΈ null

Generation​

FileMD5
Open/ce/ca/aws/backup/recovery-point-expired/policy.yamlD6F49CDEFD2B0ADDF44F100002878061
Open/ce/ca/aws/backup/recovery-point-expired/prod.logic.yamlF4D477C824C03E5A712B8827F06B178A
Open/ce/ca/aws/backup/recovery-point-expired/test-data.json644A269B908E4140BC6D2C50E1560D16
Open/types/CA10A1__CaAwsBackupRecoveryPoint__c/object.extracts.yaml2FE07057E89E7B472E2FE260DAF20421

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/aws/backup/recovery-point-expired/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/backup/recovery-point-expired/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/backup/recovery-point-expired/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/backup/recovery-point-expired/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/aws/backup/recovery-point-expired/prod.logic.yaml

Content​

Open File

---
inputType: "CA10A1__CaAwsBackupRecoveryPoint__c"
importExtracts:
- file: "/types/CA10A1__CaAwsBackupRecoveryPoint__c/object.extracts.yaml"
testData:
- file: "test-data.json"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The recovery point is not expired."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10A1__status__c"
right:
TEXT: "EXPIRED"
- status: "INCOMPLIANT"
currentStateMessage: "The recovery point is expired, but its lifecycle deletion date is not empty indicating failure to delete."
remediationMessage: "Manually delete the expired recovery point and investigate why the automated lifecycle rule failed to execute."
check:
IS_EMPTY:
arg:
EXTRACT: "CA10A1__calcLifecycleDeleteAt__c"
- status: "INCOMPLIANT"
currentStateMessage: "The recovery point was scheduled for deletion more than 2 days ago but still exists."
remediationMessage: "Manually delete the expired recovery point and investigate why the automated lifecycle rule failed to execute."
check:
IS_BEYOND_LAST_DAYS:
arg:
EXTRACT: "CA10A1__calcLifecycleDeleteAt__c"
offsetDays: 2
otherwise:
status: "COMPLIANT"
currentStateMessage: "The backup recovery point has not yet reached its deletion date."