You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
•Ensures all instances are tagged with "expiration_date" of "never" or
with an integer (epoch time).
•Terminates any instances without an expiration_date
•Terminates any instances past their expiration date
Yes, this will blow up your AWS account if instances are not tagged!
Notes
•This may not work in large AWS accounts. For this reason
I've split it out by region - you may specify a smaller array of regions
at the top. If your account is exceptionally large, it would be a very
minor effort to add an additional for loop that iterates over each VPC
in a region. Feel free to add a PR!
•We use epoch time because integers are easy to compare and I'm lazy.
Deal with it or fix it in your own environment :)
•If you tag your instance with an expiration_date that causes a
ValueError, I don't think I've handled that properly. Please don't be
manually tagging your stuff. We have terraform and cloudformation for
this, people!
About
Reaps any and all instances which are not tagged with / past an expiration date.