Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error handling tweaks #5

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

acdha
Copy link

@acdha acdha commented Jun 9, 2020

I ran into a couple of things while testing this:

  • Using the profile name from the environment avoids needing to manage it in code
  • I consolidated most of the error handling code into a single exception block which avoids some of the edge cases where e.g. it would attempt to delete an IGW even if detaching it failed for some reason
  • Regions which cannot be accessed using the active credentials display an error but don't cause the program to exit

acdha added 5 commits June 9, 2020 14:20
This relies on the standard Boto discovery mechanism so e.g. tools such
as aws-vault just work.
* Handle regions being inaccessible due to SCP or IAM policy limits
* Use a common exception handler for all error handling
The parent exception handler will also display the error so there's not much point in changing these to re-raise.
@acdha acdha force-pushed the error-handling-tweaks branch from c4475d8 to 0a655ca Compare October 14, 2020 19:35
@acdha acdha force-pushed the error-handling-tweaks branch from 0a655ca to 7106164 Compare October 14, 2020 19:37
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.

1 participant