Skip to content

Conversation

@mukavik
Copy link

@mukavik mukavik commented Sep 26, 2025

Summary

This PR fixes issue #316 where Inspector account association checks would fail unexpectedly due to inconsistent AWS API behavior.

Changes

  • Add exception handling for InternalServerException in lookup_associated_accounts function
  • AWS Inspector sometimes returns InternalServerException instead of ResourceNotFoundException
  • Check error message for 'is not an associated member' to handle this case
  • Ensures consistent behavior when checking account association status

Testing

Related Issues

Fixes #316

…ed_accounts

- Add exception handling for InternalServerException in lookup_associated_accounts
- AWS Inspector sometimes returns InternalServerException instead of ResourceNotFoundException
- Check error message for 'is not an associated member' to handle this case
- Fixes issue aws-samples#316 where account association checks would fail unexpectedly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Inspector enabler lambda exits prematurely

1 participant