Netflix-Skunkworks / aardvark

Aardvark is a multi-account AWS IAM Access Advisor API
Apache License 2.0
472 stars 77 forks source link

Adding error handling for transient roles. #61

Closed scriptsrc closed 5 years ago

scriptsrc commented 5 years ago

In very dynamic environments with roles constantly coming up and down, aardvark threads will often fail. Adding simple try/except blocks to allow them to work.

NoSuchEntityException: An error occurred (NoSuchEntity) when calling the GenerateServiceLastAccessedDetails operation: ARN arn:aws:iam::XXXXXX:policy/YYYYY does not exist.
2019-06-20 22:10:27,950 INFO: Thread #4 persisting data for account XXXXXX [in aardvark/aardvark/manage.py:76]
2019-06-20 22:10:27,951 WARNING: Cannot persist Access Advisor Data as no data was collected. [in aardvark/aardvark/manage.py:94]