The arnparse library prioritizes / over : when parsing and causes the prefix slash of the log-group path to be stripped. You may want to consider changing the logic so that it checks the string index of a colon or forward-slash and then uses whichever is first as the delimiter.
I noticed the library doesn't handle resources where there is both a "resourcetype" and path in the "resource".
For example, CloudWatch Log Groups ARNs take on the following format:
The arnparse library prioritizes / over : when parsing and causes the prefix slash of the log-group path to be stripped. You may want to consider changing the logic so that it checks the string index of a colon or forward-slash and then uses whichever is first as the delimiter.
The same is true for AWS Secrets Manager: