-
Notifications
You must be signed in to change notification settings - Fork 1
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
[IT-1729] A lambda to stop or terminate all EC2 instances in an account #1
[IT-1729] A lambda to stop or terminate all EC2 instances in an account #1
Conversation
ffd62e9
to
d25da9d
Compare
The error uploading to coveralls appears to be coverallsapp/coverage-reporter#119 |
AllowedValues: | ||
- "STOP" | ||
- "TERMINATE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think cloudformation can check for case sensitivity therefore i think stop
and terminate
are also a valid inputs. If that's true then the python code needs to handle case insensitivity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
am i missing something? I don't see any updates to handle case insensitivity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change I made was calling .lower()
inside set_instance_state
so that casing is ignored at the time of processing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohh i see it now. i thought it would be done in lambda_handler
right after reading in EC2_ACTION
so that it's consistent throughout the app.
Also fix logging in the lambda runtime environment.
remove double-processing of EC2_ACTION env var and only rely on processing the value in set_instance_state.
A lambda to stop or terminate all EC2 instances in an account.