How do I resolve the Rule Testing error "ResourceNotFoundException" in Panther?
Issue
When trying to test a rule with mocked functions the following error occurs:
[FAIL] [rule] ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the UpdateItem operation: Requested resource not found
Resolution
To resolve this issue, check your mock function names to ensure they match the ones called in your rule.
If this fails, and you're using panther_analysis_tool to test/upload your detections, ensure that the environment the rules are based in is cloned from our panther-analysis GitHub.
Cause
This issue occurs when a function called in the rule cannot be found.